# HG changeset patch # User Doug Simon # Date 1377597811 -7200 # Node ID 016da8e6fbeffc8a0af920965fc22d0ae010ee8d # Parent 0d9fe4e80ab8d1c6272e9d033ac02ebe02f6186d updated check in WriteBarrierAdditionTest to account for extra inlining diff -r 0d9fe4e80ab8 -r 016da8e6fbef graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierAdditionTest.java --- 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); } }