X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FTest%2FSystem.Threading%2FTimerTest.cs;h=ee60eb53aa23b42e028e1c2d69ca64e41bb92602;hb=055495c537473805859a4db627918347be547ee3;hp=dc6d4e50dac2c0961c4ee17f1878b5efabd2aed1;hpb=0ffa570a3aff21e50c3fdfbe4e8758eed0a7c96d;p=mono.git diff --git a/mcs/class/corlib/Test/System.Threading/TimerTest.cs b/mcs/class/corlib/Test/System.Threading/TimerTest.cs index dc6d4e50dac..ee60eb53aa2 100644 --- a/mcs/class/corlib/Test/System.Threading/TimerTest.cs +++ b/mcs/class/corlib/Test/System.Threading/TimerTest.cs @@ -60,11 +60,11 @@ namespace MonoTests.System.Threading { Timer t = new Timer (new TimerCallback (Callback), bucket, 10, 10); Thread.Sleep (500); int c = bucket.count; - Assert.IsTrue(c > 20, "#1"); + Assert.IsTrue (c > 20, "#1 " + c.ToString ()); t.Change (100, 100); c = bucket.count; Thread.Sleep (500); - Assert.IsTrue(bucket.count <= c + 20, "#2"); + Assert.IsTrue (bucket.count <= c + 20, "#2 " + c.ToString ()); t.Dispose (); } @@ -193,12 +193,11 @@ namespace MonoTests.System.Threading { Thread.Sleep(100); t.Change (int.MaxValue, Timeout.Infinite); // since period is 0 the callback should happen once (bug #340212) - Assert.IsTrue(b.count == 1); - + Assert.AreEqual (1, b.count, "only once"); } -#if !MONOTOUCH [Test] + [Ignore ()] public void TestDisposeOnCallback () { // this test is bad, as the provided `state` (t1) is null and will throw an NRE inside the callback @@ -215,7 +214,6 @@ namespace MonoTests.System.Threading { { ((Timer) foo).Dispose (); } -#endif private void Callback (object foo) {