ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ThreadTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ThreadTest.java (file contents):
Revision 1.1 by dl, Sun Aug 31 19:24:56 2003 UTC vs.
Revision 1.3 by dl, Sun Sep 14 20:42:41 2003 UTC

# Line 6 | Line 6
6   */
7  
8   import junit.framework.*;
9 import java.util.concurrent.Semaphore;
9  
10 < /**
12 < * Test java.lang.Thread
13 < *
14 < */
15 <
16 < public class ThreadTest extends TestCase {
10 > public class ThreadTest extends JSR166TestCase {
11      public static void main(String[] args) {
12          junit.textui.TestRunner.run(suite());  
13      }
# Line 33 | Line 27 | public class ThreadTest extends TestCase
27          // dependencies across tests
28          Thread current = Thread.currentThread();
29          ThreadGroup tg = current.getThreadGroup();
36        assertNull(Thread.getDefaultUncaughtExceptionHandler());
37        assertEquals(tg, current.getUncaughtExceptionHandler());
30          MyHandler eh = new MyHandler();
39        Thread.setDefaultUncaughtExceptionHandler(eh);
40        assertEquals(eh, current.getUncaughtExceptionHandler());
41        assertEquals(eh, Thread.getDefaultUncaughtExceptionHandler());
42        Thread.setDefaultUncaughtExceptionHandler(null);
43        assertNull(Thread.getDefaultUncaughtExceptionHandler());
31          assertEquals(tg, current.getUncaughtExceptionHandler());
32          current.setUncaughtExceptionHandler(eh);
33          assertEquals(eh, current.getUncaughtExceptionHandler());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines