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

Comparing jsr166/src/test/tck/CompletableFutureTest.java (file contents):
Revision 1.9 by dl, Wed Mar 27 19:45:42 2013 UTC vs.
Revision 1.12 by jsr166, Sun Mar 31 18:16:35 2013 UTC

# Line 53 | Line 53 | public class CompletableFutureTest exten
53          catch (Throwable fail) { threadUnexpectedException(fail); }
54      }
55  
56 <    void checkCompletedNormally(CompletableFuture<?> f, Object value) {
56 >    <T> void checkCompletedNormally(CompletableFuture<T> f, T value) {
57          try {
58              assertEquals(value, f.join());
59          } catch (Throwable fail) { threadUnexpectedException(fail); }
# Line 272 | Line 272 | public class CompletableFutureTest exten
272      }
273  
274      /**
275 <     * completedFuture returns a completed CompletableFuture with give value
275 >     * completedFuture returns a completed CompletableFuture with given value
276       */
277      public void testCompletedFuture() {
278          CompletableFuture<String> f = CompletableFuture.completedFuture("test");
# Line 2393 | Line 2393 | public class CompletableFutureTest exten
2393          CompletableFuture<Integer> f = new CompletableFuture<Integer>();
2394          CompletableFuture<Integer> g = new CompletableFuture<Integer>();
2395          CompletableFuture h;
2396 +        Runnable[] actions = {
2397 +            () => f.thenApply(null),
2398 +        }
2399          try { h = f.thenApply(null); } catch (NullPointerException ok) {}
2400          try { h = f.thenAccept(null); } catch (NullPointerException ok) {}
2401          try { h = f.thenRun(null); } catch (NullPointerException ok) {}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines