use of com.oracle.truffle.api.utilities.UnionAssumption in project graal by oracle.
the class UnionAssumptionTest method testIsValid.
@Test
public void testIsValid() {
final Assumption first = Truffle.getRuntime().createAssumption("first");
final Assumption second = Truffle.getRuntime().createAssumption("second");
final UnionAssumption union = new UnionAssumption(first, second);
assertTrue(union.isValid());
}
use of com.oracle.truffle.api.utilities.UnionAssumption in project graal by oracle.
the class UnionAssumptionTest method testBothInvalidateCheck.
@Test(expected = InvalidAssumptionException.class)
public void testBothInvalidateCheck() throws InvalidAssumptionException {
final Assumption first = Truffle.getRuntime().createAssumption("first");
final Assumption second = Truffle.getRuntime().createAssumption("second");
final UnionAssumption union = new UnionAssumption(first, second);
first.invalidate();
second.invalidate();
union.check();
}
use of com.oracle.truffle.api.utilities.UnionAssumption in project graal by oracle.
the class UnionAssumptionTest method testBothInvalidateIsValid.
@Test
public void testBothInvalidateIsValid() {
final Assumption first = Truffle.getRuntime().createAssumption("first");
final Assumption second = Truffle.getRuntime().createAssumption("second");
final UnionAssumption union = new UnionAssumption(first, second);
first.invalidate();
second.invalidate();
assertFalse(union.isValid());
}
Aggregations