use of com.oracle.truffle.api.utilities.CyclicAssumption in project graal by oracle.
the class CyclicAssumptionTest method testInvalidate.
@Test
public void testInvalidate() {
final CyclicAssumption cyclicAssumption = new CyclicAssumption("cyclic-assumption");
final Assumption firstAssumption = cyclicAssumption.getAssumption();
assertEquals("cyclic-assumption", firstAssumption.getName());
assertTrue(firstAssumption.isValid());
cyclicAssumption.invalidate();
assertFalse(firstAssumption.isValid());
final Assumption secondAssumption = cyclicAssumption.getAssumption();
assertEquals("cyclic-assumption", secondAssumption.getName());
assertTrue(secondAssumption.isValid());
cyclicAssumption.invalidate();
assertFalse(firstAssumption.isValid());
assertFalse(secondAssumption.isValid());
}
use of com.oracle.truffle.api.utilities.CyclicAssumption in project graal by oracle.
the class CyclicAssumptionTest method testIsValid.
@Test
public void testIsValid() {
final CyclicAssumption assumption = new CyclicAssumption("cyclic-assumption");
assertTrue(assumption.getAssumption().isValid());
}
Aggregations