// Am going with door #1, but it would be nice to investigate this.
// -- Ben
//
- [Category ("NotWorking")]
public class TimerTest : Assertion {
-
- public int counter;
-
- private void Callback (object foo) {
- counter ++;
- }
-
+ [Test]
+ [Category ("NotWorking")]
public void TestDueTime ()
{
counter = 0;
Assert ("t3", counter > 20);
t.Dispose ();
}
-
+
+ [Test]
+ [Category ("NotWorking")]
public void TestChange ()
{
counter = 0;
t.Dispose ();
}
+ [Test]
+ [Category ("NotWorking")]
public void TestZeroDueTime () {
counter = 0;
AssertEquals (2, counter);
t.Dispose ();
}
-
+
+ [Test]
+ [Category ("NotWorking")]
public void TestDispose ()
{
counter = 0;
Thread.Sleep (200);
AssertEquals (c, counter);
}
-
- private void CallbackTestDispose (object foo) {
- counter ++;
- }
- Timer t1;
+ [Test] // bug #78208
+ public void TestDispose2 ()
+ {
+ Timer t = new Timer (new TimerCallback (CallbackTestDispose), null, 10, 10);
+ t.Dispose ();
+ t.Dispose ();
+ }
+
+ [Test]
+ [Category ("NotWorking")]
public void TestDisposeOnCallback () {
counter = 0;
t1 = new Timer (new TimerCallback (CallbackTestDisposeOnCallback), null, 0, 10);
t1 = null;
}
}
+
+ private void CallbackTestDispose (object foo)
+ {
+ counter++;
+ }
+
+ private void Callback (object foo)
+ {
+ counter++;
+ }
+
+ Timer t1;
+ int counter;
}
}