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

Comparing jsr166/src/test/tck/CountedCompleterTest.java (file contents):
Revision 1.24 by jsr166, Sun Oct 18 19:20:05 2015 UTC vs.
Revision 1.32 by jsr166, Sat Mar 11 17:33:32 2017 UTC

# Line 210 | Line 210 | public class CountedCompleterTest extend
210          final AtomicInteger onCompletionN = new AtomicInteger(0);
211          final AtomicInteger onExceptionalCompletionN = new AtomicInteger(0);
212          final AtomicInteger setRawResultN = new AtomicInteger(0);
213 <        final AtomicReference<Object> rawResult = new AtomicReference<Object>(null);
213 >        final AtomicReference<Object> rawResult = new AtomicReference<>(null);
214          int computeN() { return computeN.get(); }
215          int onCompletionN() { return onCompletionN.get(); }
216          int onExceptionalCompletionN() { return onExceptionalCompletionN.get(); }
# Line 335 | Line 335 | public class CountedCompleterTest extend
335      public void testSetPendingCount() {
336          NoopCC a = new NoopCC();
337          assertEquals(0, a.getPendingCount());
338 <        for (int val : new int[] { -1, 0, 1, Integer.MIN_VALUE, Integer.MAX_VALUE }) {
338 >        int[] vals = {
339 >             -1, 0, 1,
340 >             Integer.MIN_VALUE,
341 >             Integer.MAX_VALUE,
342 >        };
343 >        for (int val : vals) {
344              a.setPendingCount(val);
345              assertEquals(val, a.getPendingCount());
346          }
# Line 351 | Line 356 | public class CountedCompleterTest extend
356          assertEquals(1, a.getPendingCount());
357          a.addToPendingCount(27);
358          assertEquals(28, a.getPendingCount());
359 +        a.addToPendingCount(-28);
360 +        assertEquals(0, a.getPendingCount());
361      }
362  
363      /**
# Line 492 | Line 499 | public class CountedCompleterTest extend
499      }
500  
501      /**
502 <     * quietlyCompleteRoot completes root task
502 >     * quietlyCompleteRoot completes root task and only root task
503       */
504      public void testQuietlyCompleteRoot() {
505          NoopCC a = new NoopCC();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines