use of com.oracle.truffle.api.profiles.BranchProfile in project graal by oracle.
the class BranchProfileTest method testToString.
@Test
public void testToString() {
BranchProfile profile = (BranchProfile) invokeStatic(loadRelative(CountingConditionProfileTest.class, "BranchProfile$Enabled"), "create0");
assertTrue(profile.toString().contains(BranchProfile.class.getSimpleName()));
assertTrue(profile.toString().contains("UNINITIALIZED"));
assertTrue(profile.toString().contains(Integer.toHexString(profile.hashCode())));
profile.enter();
assertTrue(profile.toString().contains(BranchProfile.class.getSimpleName()));
assertTrue(profile.toString().contains("VISITED"));
assertTrue(profile.toString().contains(Integer.toHexString(profile.hashCode())));
}
use of com.oracle.truffle.api.profiles.BranchProfile in project graal by oracle.
the class BranchProfileTest method testEnter.
@Test
public void testEnter() {
BranchProfile profile = (BranchProfile) invokeStatic(loadRelative(CountingConditionProfileTest.class, "BranchProfile$Enabled"), "create0");
profile.enter();
profile.enter();
}
Aggregations