--- jsr166/src/test/tck/SynchronousQueueTest.java 2009/12/01 06:03:49 1.19 +++ jsr166/src/test/tck/SynchronousQueueTest.java 2010/09/16 00:52:49 1.23 @@ -15,7 +15,7 @@ import java.io.*; public class SynchronousQueueTest extends JSR166TestCase { public static void main(String[] args) { - junit.textui.TestRunner.run (suite()); + junit.textui.TestRunner.run(suite()); } public static Test suite() { @@ -119,6 +119,7 @@ public class SynchronousQueueTest extend shouldThrow(); } catch (NullPointerException success) {} } + /** * addAll throws ISE if no active taker */ @@ -174,7 +175,7 @@ public class SynchronousQueueTest extend ++added; } } catch (InterruptedException success) { - assertTrue(added == 1); + assertEquals(1, added); } }}); @@ -251,7 +252,7 @@ public class SynchronousQueueTest extend ++added; } } catch (InterruptedException success) { - assertTrue(added == 1); + assertEquals(1, added); } }}); @@ -578,7 +579,6 @@ public class SynchronousQueueTest extend }}); joinPool(executor); - } /** @@ -717,9 +717,9 @@ public class SynchronousQueueTest extend ArrayList l = new ArrayList(); Thread.sleep(SHORT_DELAY_MS); q.drainTo(l, 1); - assertTrue(l.size() == 1); + assertEquals(1, l.size()); q.drainTo(l, 1); - assertTrue(l.size() == 2); + assertEquals(2, l.size()); assertTrue(l.contains(one)); assertTrue(l.contains(two)); t1.join();