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

Comparing jsr166/src/test/tck/PhaserTest.java (file contents):
Revision 1.9 by jsr166, Thu Nov 26 15:42:15 2009 UTC vs.
Revision 1.10 by jsr166, Tue Dec 1 10:03:59 2009 UTC

# Line 358 | Line 358 | public class PhaserTest extends JSR166Te
358                      phaseCount.incrementAndGet();
359                      sleepTillInterrupted(SMALL_DELAY_MS);
360                      phaser.awaitAdvance(phase);
361 <                    threadAssertTrue(phaseCount.get() == 4);
361 >                    assertEquals(phaseCount.get(), 4);
362                  }}));
363          }
364          for (Thread thread : threads)
# Line 381 | Line 381 | public class PhaserTest extends JSR166Te
381                      phaser.arrive();
382                  }}));
383              phase = phaser.awaitAdvance(phaser.arrive());
384 <            threadAssertEquals(phase, phaser.getPhase());
384 >            assertEquals(phase, phaser.getPhase());
385          }
386          for (Thread thread : threads)
387              thread.join();
# Line 405 | Line 405 | public class PhaserTest extends JSR166Te
405                  /*
406                   * This point is reached when force termination is called in which phase = -1
407                   */
408 <                threadAssertTrue(phase < 0);
409 <                threadAssertTrue(phaser.isTerminated());
408 >                assertTrue(phase < 0);
409 >                assertTrue(phaser.isTerminated());
410              }});
411          /*
412           * This thread will cause the first thread run to wait, in doing so
# Line 418 | Line 418 | public class PhaserTest extends JSR166Te
418                  sleepTillInterrupted(MEDIUM_DELAY_MS);
419                  int p1 = phaser.arrive();
420                  int phase = phaser.awaitAdvance(p1);
421 <                threadAssertTrue(phase < 0);
422 <                threadAssertTrue(phaser.isTerminated());
421 >                assertTrue(phase < 0);
422 >                assertTrue(phaser.isTerminated());
423              }});
424  
425          phaser.arrive();
# Line 480 | Line 480 | public class PhaserTest extends JSR166Te
480          arrivingCount.incrementAndGet();
481          //the + 1 adds to expectedArrive to account for the main threads arrival
482          int expectedArrived = phaseNumber > 0 ? phaseNumber * six + 1 : phaser.getArrivedParties() + 1;
483 <        threadAssertEquals(expectedArrived, arrivingCount.get());
483 >        assertEquals(expectedArrived, arrivingCount.get());
484          for (Thread thread : threads)
485              thread.join();
486      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines