X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FTest%2FSystem.Threading%2FThreadLocalTests.cs;h=37683efb91e7a1d0c95291687fd4b7a1cbedf628;hb=16d9d078218d3188428d103e67315add70a1c368;hp=5682c6cdae073fbd0e4f84ad8aa1118eac49bb0a;hpb=261e0ba03b1220de78dad6882270e7ca14b88069;p=mono.git diff --git a/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs b/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs index 5682c6cdae0..37683efb91e 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs @@ -30,6 +30,9 @@ using System.Threading; using NUnit; using NUnit.Framework; +#if !MOBILE +using NUnit.Framework.SyntaxHelpers; +#endif namespace MonoTests.System.Threading { @@ -69,7 +72,6 @@ namespace MonoTests.System.Threading threadLocal = new ThreadLocal (() => { Interlocked.Increment (ref callTime); throw new ApplicationException ("foo"); - return 43; }); Exception exception = null; @@ -81,7 +83,7 @@ namespace MonoTests.System.Threading } Assert.IsNotNull (exception, "#1"); - Assert.IsInstanceOfType (typeof (ApplicationException), exception, "#2"); + Assert.That (exception, Is.TypeOf (typeof (ApplicationException)), "#2"); Assert.AreEqual (1, callTime, "#3"); exception = null; @@ -93,7 +95,7 @@ namespace MonoTests.System.Threading } Assert.IsNotNull (exception, "#4"); - Assert.IsInstanceOfType (typeof (ApplicationException), exception, "#5"); + Assert.That (exception, Is.TypeOf (typeof (ApplicationException)), "#5"); Assert.AreEqual (1, callTime, "#6"); } @@ -161,7 +163,7 @@ namespace MonoTests.System.Threading t.Join (); Assert.AreEqual (false, thread_value_created, "#4"); Assert.IsNotNull (exception, "#5"); - Assert.IsInstanceOfType (typeof (ApplicationException), exception, "#6"); + Assert.That (exception, Is.TypeOf (typeof (ApplicationException)), "#6"); } void AssertThreadLocal ()