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.40 by jsr166, Sat Apr 25 04:55:31 2015 UTC vs.
Revision 1.42 by jsr166, Sun May 24 01:42:14 2015 UTC

# Line 338 | Line 338 | public class PhaserTest extends JSR166Te
338       * registered or unarrived parties would become negative
339       */
340      public void testArriveAndDeregister1() {
341 +        Phaser phaser = new Phaser();
342          try {
342            Phaser phaser = new Phaser();
343              phaser.arriveAndDeregister();
344              shouldThrow();
345          } catch (IllegalStateException success) {}
# Line 625 | Line 625 | public class PhaserTest extends JSR166Te
625              threads.add(newStartedThread(new CheckedRunnable() {
626                  public void realRun() {
627                      for (int k = 0; k < 3; k++) {
628 <                        assertEquals(2*k+1, phaser.arriveAndAwaitAdvance());
628 >                        assertEquals(2 * k + 1, phaser.arriveAndAwaitAdvance());
629                          count.incrementAndGet();
630 <                        assertEquals(2*k+1, phaser.arrive());
631 <                        assertEquals(2*k+2, phaser.awaitAdvance(2*k+1));
632 <                        assertEquals(4*(k+1), count.get());
630 >                        assertEquals(2 * k + 1, phaser.arrive());
631 >                        assertEquals(2 * k + 2, phaser.awaitAdvance(2 * k + 1));
632 >                        assertEquals(4 * (k + 1), count.get());
633                      }}}));
634  
635          for (Thread thread : threads)
# Line 748 | Line 748 | public class PhaserTest extends JSR166Te
748       * unarrived parties
749       */
750      public void testArriveAndAwaitAdvance1() {
751 +        Phaser phaser = new Phaser();
752          try {
752            Phaser phaser = new Phaser();
753              phaser.arriveAndAwaitAdvance();
754              shouldThrow();
755          } catch (IllegalStateException success) {}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines