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

Comparing jsr166/src/test/tck/SynchronousQueueTest.java (file contents):
Revision 1.22 by jsr166, Wed Aug 25 01:44:48 2010 UTC vs.
Revision 1.24 by dl, Wed Sep 29 12:33:48 2010 UTC

# Line 175 | Line 175 | public class SynchronousQueueTest extend
175                          ++added;
176                      }
177                  } catch (InterruptedException success) {
178 <                    assertTrue(added == 1);
178 >                    assertEquals(1, added);
179                  }
180              }});
181  
# Line 252 | Line 252 | public class SynchronousQueueTest extend
252                          ++added;
253                      }
254                  } catch (InterruptedException success) {
255 <                    assertTrue(added == 1);
255 >                    assertEquals(1, added);
256                  }
257              }});
258  
# Line 347 | Line 347 | public class SynchronousQueueTest extend
347          final SynchronousQueue q = new SynchronousQueue();
348          Thread t = new Thread(new CheckedRunnable() {
349              public void realRun() throws InterruptedException {
350                assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
351                assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS));
350                  try {
351 +                    assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
352 +                    assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS));
353                      q.poll(LONG_DELAY_MS, MILLISECONDS);
354                      shouldThrow();
355                  } catch (InterruptedException success) {}
# Line 387 | Line 387 | public class SynchronousQueueTest extend
387          final SynchronousQueue q = new SynchronousQueue(true);
388          Thread t = new Thread(new CheckedRunnable() {
389              public void realRun() throws InterruptedException {
390                assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
391                assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS));
390                  try {
391 +                    assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
392 +                    assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS));
393                      q.poll(LONG_DELAY_MS, MILLISECONDS);
394                      threadShouldThrow();
395                  } catch (InterruptedException success) {}
# Line 717 | Line 717 | public class SynchronousQueueTest extend
717          ArrayList l = new ArrayList();
718          Thread.sleep(SHORT_DELAY_MS);
719          q.drainTo(l, 1);
720 <        assertTrue(l.size() == 1);
720 >        assertEquals(1, l.size());
721          q.drainTo(l, 1);
722 <        assertTrue(l.size() == 2);
722 >        assertEquals(2, l.size());
723          assertTrue(l.contains(one));
724          assertTrue(l.contains(two));
725          t1.join();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines