Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

links to failing line of code acts odd when methods collapsed
johnmwright
#1 Posted : Thursday, May 24, 2012 8:24:20 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 9/27/2011(UTC)
Posts: 45
Location: Chicago, IL

Thanks: 3 times
Was thanked: 7 time(s) in 6 post(s)
When a test fixture file has mutliple methods, and the method above a failing test are collapsed, when you click the link in the NCrunch Tests window to go to the line of code that is failing, the failing line is positions just off the top of the screen.

Specifically, using the test fixture code at the end of the post, the test "FailingTest" will fail and generate this message:
at NUnit.Framework.Assert.Fail(String message, Object[] args)
at NUnit.Framework.Assert.Fail()
at My.Test.Temp.FailingTest() in C:\Work\InRuleV4\v3.3_Main\InRuleForDynamicsCRM\InRule.Dynamics.Test\Temp.cs:line 55

If the file is completely expanded (no methods collapsed), and you click on the "line 55" link, it centers the failing test in the visible area of the visual studio window.

If the methods above FailingTest (named CollapseThisTest1 - 4) are collapsed, then when you click the link the first visible line in the visual studio window is line 56.

I have another fixture where there are hundreds of lines above and below the failing test, all of which are collapsed. In this case, clicking the link to the failing test takes me almost 100 lines further down the file than the actual line that's failing.

I would expect to have the line referenced in the link to be visible, and preferably centered in the window, even if the methods above it are collapsed.

System Info:
Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.5.50131 SP1Rel
Installed Version: Premium

JetBrains ReSharper 7 EAP Full Edition build 7.0.51.137 on 2012-05-23T05:22:36
JetBrains ReSharper 7 EAP package for Microsoft Visual Studio. For more information about ReSharper, visit http://www.jetbrains.com/resharper/. Copyright © 2003–2012 JetBrains, Inc.

NCrunch v1.39.0.15b
Continuous Testing Tool for .NET
Copyright © 2010-2012 Remco Software Ltd

Test Fixture to reproduce:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using NUnit.Framework;

namespace My.Test
{
[TestFixture]
public class Temp
{

[Test]
public void CollapseThisTest1()
{
//collapse this method


}


[Test]
public void CollapseThisTest2()
{
//collapse this method



}


[Test]
public void CollapseThisTest3()
{
//collapse this method


}


[Test]
public void CollapseThisTest4()
{
//collapse this method


}


[Test]
public void FailingTest()
{
Assert.Fail();
}



[Test]
public void FillerTest1()
{
//this is just to give some extra lines
//to the file
}


[Test]
public void FillerTest2()
{
//this is just to give some extra lines
//to the file
}



[Test]
public void FillerTest3()
{
//this is just to give some extra lines
//to the file
}

[Test]
public void FillerTest4()
{
//this is just to give some extra lines
//to the file
}


[Test]
public void FillerTest5()
{
//this is just to give some extra lines
//to the file
}


[Test]
public void FillerTest6()
{
//this is just to give some extra lines
//to the file
}


[Test]
public void FillerTest7()
{
//this is just to give some extra lines
//to the file
}


}
}
Remco
#2 Posted : Thursday, May 24, 2012 10:39:23 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi John -

Thanks for reporting this. Right now NCrunch does have a known problem where collapsed methods and regions are messing up line identification during navigation. I hope to have this fixed soon.


Cheers,

Remco
Remco
#3 Posted : Tuesday, June 19, 2012 4:45:14 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
For anyone interested, 1.40b has just been released with a fix for the above issue.
1 user thanked Remco for this useful post.
johnmwright on 6/21/2012(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.057 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download