Skip to content

Commit

Permalink
Increase number of loop in the test.
Browse files Browse the repository at this point in the history
  • Loading branch information
axel22 committed Sep 9, 2020
1 parent 22d8ec3 commit f116db3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
package org.graalvm.compiler.core.test;

import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.nodes.calc.ObjectEqualsNode;
import org.junit.Test;

Expand Down Expand Up @@ -55,13 +56,16 @@ public void cellTest() {
final Integer value = 19112;
final Cell<Integer> cell = new Cell<>(value);
ResolvedJavaMethod get = getResolvedJavaMethod(IntegerBoxEqualsTest.class, "cellGet");
for (int i = 0; i < 1000; i++) {
for (int i = 0; i < 2000; i++) {
for (int j = 0; j < 20; j++) {
cellGet(cell, i);
}
cellGet(cell, value);
}
test(get, null, cell, 0);
if (lastCompiledGraph.getNodes().filter(ObjectEqualsNode.class).count() != 0) {
DebugContext.forCurrentThread().forceDump(lastCompiledGraph, "comparisons");
}
assertTrue(lastCompiledGraph.getNodes().filter(ObjectEqualsNode.class).count() == 0, "There must be no reference comparisons in the graph.");
}

Expand Down

0 comments on commit f116db3

Please sign in to comment.