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

Notification

Icon
Error

Including '(' or ')' char in F# mstest class name leads to NullReferenceException
slyvs
#1 Posted : Tuesday, February 6, 2018 10:58:06 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/5/2018(UTC)
Posts: 3
Location: Switzerland

Was thanked: 1 time(s) in 1 post(s)
In F# unit test project targeting net462 & referencing mstest v2 latest nuget.
Code:

namespace ns
open Microsoft.VisualStudio.TestTools.UnitTesting
open Swensen.Unquote
[<TestClass>]
type ``Liquid Crystal (LC) Calibration process tests``() =
    
    [<TestMethod>]
    member __.``Test Method``() =
        test <@ true @>


that (LC) thing causes NullReferenceException
> nCrunch.Module.MSTest.dll!nCrunch.Module.MSTest.Integration.MSTestRunner.runTestsWithinAssembly(System.Collections.Generic.IList<nCrunch.TestExecution.PendingTest> testsToRun, nCrunch.TestExecution.TestTaskOutput testOutput) Unknown No symbols loaded.
nCrunch.Common.dll!nCrunch.Common.PerformanceTracking.PerfTracker.TrackUnreliableActivity(string name, System.Action activity) Unknown No symbols loaded.
nCrunch.Common.dll!nCrunch.Common.PerformanceTracking.PerfTracker.TryTrackUnreliableActivity(string name, System.Action activity) Unknown No symbols loaded.
nCrunch.Module.MSTest.dll!nCrunch.Module.MSTest.Integration.MSTestRunner.RunTests(System.Collections.Generic.IList<nCrunch.TestExecution.PendingTest> testsToRun, nCrunch.TestExecution.TestTaskOutput testOutput) Unknown No symbols loaded.
nCrunch.TestExecution.dll!nCrunch.TestExecution.TestExecutionMonitor.PerformMonitoredTestExecution(System.Action testExecutionAction) Unknown No symbols loaded.
nCrunch.TestExecution.dll!nCrunch.TestExecution.TestRunnerThread.() Unknown No symbols loaded.
nCrunch.TestExecution.dll!nCrunch.TestExecution.TestRunnerThread.() Unknown No symbols loaded.
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown No symbols loaded.
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown No symbols loaded.
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown No symbols loaded.
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() Unknown No symbols loaded.
[Native to Managed Transition] Annotated Frame

Remco
#2 Posted : Tuesday, February 6, 2018 11:47:10 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this problem.

I think I can see how this could come about. It's caused by a hole in NCrunch's support for methods/classes that contain brackets in their names. In most .NET based languages, it isn't possible to create these, though F# seems to be the exception. I'll make a note to see if we can introduce a fix for this. For the time being, I recommend renaming the test class.
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.024 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download