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

Comparing jsr166/src/test/tck/SystemTest.java (file contents):
Revision 1.3 by dl, Sat Sep 20 18:20:08 2003 UTC vs.
Revision 1.4 by tim, Mon Dec 8 20:01:50 2003 UTC

# Line 9 | Line 9 | import junit.framework.*;
9  
10   public class SystemTest extends JSR166TestCase {
11      public static void main(String[] args) {
12 <        junit.textui.TestRunner.run(suite());  
12 >        junit.textui.TestRunner.run(suite());  
13      }
14      
15      public static Test suite() {
16 <        return new TestSuite(SystemTest.class);
16 >        return new TestSuite(SystemTest.class);
17      }
18  
19      /**
20 <     * Nanos between readings of millis is no longer than millis.
20 >     * Nanos between readings of millis is no longer than millis (plus
21 >     * one milli to allow for rounding).
22       * This shows only that nano timing not (much) worse than milli.
23       */
24      public void testNanoTime1() {
# Line 33 | Line 34 | public class SystemTest extends JSR166Te
34              long nanos = n2 - n1;
35              
36              assertTrue(nanos >= 0);
37 <            assertTrue(nanos <= millis * 1000000);
37 >            assertTrue(nanos < (millis+1) * 1000000);
38          }
39          catch(InterruptedException ie) {
40              unexpectedException();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines