adding a test case
[IRC.git] / Robust / src / Tests / ThreadTest.java
1 public class Foo {
2     Foo x;
3     Foo() {}
4
5 }
6
7 public class ThreadTest extends Thread {
8     public ThreadTest() {
9     }
10
11     public static void main(String[] st) {
12         System.printString("hello");
13         ThreadTest tt=new ThreadTest();
14         tt.start();
15         tt=new ThreadTest();
16         tt.start();
17         System.printString("main\n");
18         System.printString("main\n");
19         System.printString("main\n");
20         System.printString("main\n");
21     }
22     public void run() {
23         System.printString("thread\n");
24         Foo x=null;
25         for(int i=0;i<1000;i++) {
26             Foo y=new Foo();
27             y.x=x;
28             x=y;
29         }
30     }
31 }