diff options
author | Narayan Kamath <narayan@google.com> | 2014-05-13 16:43:47 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-13 16:43:47 +0000 |
commit | ddb6061eb51e5a8fe841e6ae88999ad7581f568a (patch) | |
tree | 3d3103423f383e1a11f5e292cc4a16b442fa3b94 /harmony-tests/src/test | |
parent | 8f863cc84923451eac80b94956dd62176cb091c4 (diff) | |
parent | 100e8709eff57f7803a6337d278a5c3b2cf12bb4 (diff) | |
download | libcore-ddb6061eb51e5a8fe841e6ae88999ad7581f568a.zip libcore-ddb6061eb51e5a8fe841e6ae88999ad7581f568a.tar.gz libcore-ddb6061eb51e5a8fe841e6ae88999ad7581f568a.tar.bz2 |
am 100e8709: am c490e4dc: am 85cd6a19: Merge "Fix tests that relied on ReferenceQueue ordering semantics."
* commit '100e8709eff57f7803a6337d278a5c3b2cf12bb4':
Fix tests that relied on ReferenceQueue ordering semantics.
Diffstat (limited to 'harmony-tests/src/test')
-rw-r--r-- | harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java index ba28541..75a5218 100644 --- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java +++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java @@ -76,7 +76,8 @@ public class ReferenceQueueTest extends junit.framework.TestCase { pr.enqueue(); try { - assertNull("Remove failed.", rq.poll().get()); + assertTrue("Remove failed.", ((Boolean) rq.poll().get()) + .booleanValue()); } catch (Exception e) { fail("Exception during the test : " + e.getMessage()); } @@ -88,11 +89,11 @@ public class ReferenceQueueTest extends junit.framework.TestCase { } try { - assertTrue("Remove failed.", ((Boolean) rq.poll().get()) - .booleanValue()); + assertNull("Remove failed.", rq.poll().get()); } catch (Exception e) { fail("Exception during the test : " + e.getMessage()); } + assertNull(rq.poll()); sr.enqueue(); @@ -182,11 +183,11 @@ public class ReferenceQueueTest extends junit.framework.TestCase { try { Reference result = rq.remove(1L); - assertTrue((Boolean)result.get()); + assertNull(result.get()); result = rq.remove(1L); assertEquals(obj, result.get()); result = rq.remove(1L); - assertNull(result.get()); + assertTrue((Boolean)result.get()); } catch (IllegalArgumentException e1) { fail("IllegalArgumentException was thrown."); } catch (InterruptedException e1) { |