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.33 by jsr166, Wed Jun 22 07:46:57 2011 UTC vs.
Revision 1.34 by jsr166, Mon Jun 27 04:07:51 2011 UTC

# Line 165 | Line 165 | public class PhaserTest extends JSR166Te
165      }
166  
167      /**
168 <     * register() correctly returns the current barrier phase number when
169 <     * invoked
168 >     * register() correctly returns the current barrier phase number
169 >     * when invoked
170       */
171      public void testRegister3() {
172          Phaser phaser = new Phaser();
# Line 177 | Line 177 | public class PhaserTest extends JSR166Te
177      }
178  
179      /**
180 <     * register causes the next arrive to not increment the phase rather retain
181 <     * the phase number
180 >     * register causes the next arrive to not increment the phase
181 >     * rather retain the phase number
182       */
183      public void testRegister4() {
184          Phaser phaser = new Phaser(1);
# Line 189 | Line 189 | public class PhaserTest extends JSR166Te
189      }
190  
191      /**
192 +     * register on a subphaser that is currently empty succeeds, even
193 +     * in the presence of another non-empty subphaser
194 +     * XXXX broken (hangs) as of 2011-06-26
195 +     */
196 +    public void XXXXtestRegisterEmptySubPhaser() {
197 +        Phaser root = new Phaser();
198 +        Phaser child1 = new Phaser(root, 1);
199 +        Phaser child2 = new Phaser(root, 0);
200 +        assertEquals(0, child2.register());
201 +        assertEquals(0, child2.arriveAndDeregister());
202 +        assertEquals(0, child2.register());
203 +        assertEquals(0, child2.arriveAndDeregister());
204 +        assertState(child2, 0, 0, 0);
205 +    }
206 +
207 +    /**
208       * Invoking bulkRegister with a negative parameter throws an
209       * IllegalArgumentException
210       */
# Line 200 | Line 216 | public class PhaserTest extends JSR166Te
216      }
217  
218      /**
219 <     * bulkRegister should correctly record the number of unarrived parties with
220 <     * the number of parties being registered
219 >     * bulkRegister should correctly record the number of unarrived
220 >     * parties with the number of parties being registered
221       */
222      public void testBulkRegister2() {
223          Phaser phaser = new Phaser();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines