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.1 by jsr166, Wed Feb 6 19:55:06 2013 UTC vs.
Revision 1.3 by jsr166, Sat Feb 9 19:33:08 2013 UTC

# Line 28 | Line 28 | public class CompletableFutureTest exten
28          return new TestSuite(CompletableFutureTest.class);
29      }
30  
31 +    // XXXX Just a skeleton implementation for now.
32 +    public void testTODO() {
33 +        fail("Please add some real tests!");
34 +    }
35 +
36      public void testToString() {
37          CompletableFuture<String> f;
38 <        assertTrue(new CompletableFuture<String>().toString()
34 <                   .contains("[Not completed]"));
38 >
39          f = new CompletableFuture<String>();
40 +        assertTrue(f.toString().contains("[Not completed]"));
41 +
42          f.complete("foo");
43          assertTrue(f.toString().contains("[Completed normally]"));
44 +
45          f = new CompletableFuture<String>();
46          f.completeExceptionally(new IndexOutOfBoundsException());
47          assertTrue(f.toString().contains("[Completed exceptionally]"));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines