Mercurial > hg > graal-jvmci-8
changeset 11435:016da8e6fbef
updated check in WriteBarrierAdditionTest to account for extra inlining
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 27 Aug 2013 12:03:31 +0200 |
parents | 0d9fe4e80ab8 |
children | 3ceffcb771e5 |
files | graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierAdditionTest.java |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierAdditionTest.java Tue Aug 27 00:52:14 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierAdditionTest.java Tue Aug 27 12:03:31 2013 +0200 @@ -153,7 +153,7 @@ */ @Test public void test5() throws Exception { - test("test5Snippet", useG1GC() ? 9 : 4); + test("test5Snippet", useG1GC() ? 1 : 0); } public static Object test5Snippet() throws Exception { @@ -262,17 +262,17 @@ } else { barriers = graph.getNodes(SerialWriteBarrier.class).count(); } - Assert.assertTrue(barriers == expectedBarriers); + Assert.assertEquals(expectedBarriers, barriers); for (WriteNode write : graph.getNodes(WriteNode.class)) { if (useG1GC()) { if (write.getBarrierType() != BarrierType.NONE) { - Assert.assertTrue(write.successors().count() == 1); + Assert.assertEquals(1, write.successors().count()); Assert.assertTrue(write.next() instanceof G1PostWriteBarrier); Assert.assertTrue(write.predecessor() instanceof G1PreWriteBarrier); } } else { if (write.getBarrierType() != BarrierType.NONE) { - Assert.assertTrue(write.successors().count() == 1); + Assert.assertEquals(1, write.successors().count()); Assert.assertTrue(write.next() instanceof SerialWriteBarrier); } } @@ -281,10 +281,10 @@ for (ReadNode read : graph.getNodes(ReadNode.class)) { if (read.getBarrierType() != BarrierType.NONE) { if (read.location() instanceof ConstantLocationNode) { - Assert.assertTrue(((ConstantLocationNode) (read.location())).getDisplacement() == referentOffset()); + Assert.assertEquals(referentOffset(), ((ConstantLocationNode) (read.location())).getDisplacement()); } Assert.assertTrue(useG1GC()); - Assert.assertTrue(read.getBarrierType() == BarrierType.PRECISE); + Assert.assertEquals(BarrierType.PRECISE, read.getBarrierType()); Assert.assertTrue(read.next() instanceof G1ReferentFieldReadBarrier); } }