use of com.oracle.truffle.api.utilities.UnionAssumption in project graal by oracle.
the class UnionAssumptionTest method testCheck.
@Test
public void testCheck() throws InvalidAssumptionException {
final Assumption first = Truffle.getRuntime().createAssumption("first");
final Assumption second = Truffle.getRuntime().createAssumption("second");
final UnionAssumption union = new UnionAssumption(first, second);
union.check();
}
use of com.oracle.truffle.api.utilities.UnionAssumption in project graal by oracle.
the class UnionAssumptionTest method testFirstInvalidateIsValid.
@Test
public void testFirstInvalidateIsValid() {
final Assumption first = Truffle.getRuntime().createAssumption("first");
final Assumption second = Truffle.getRuntime().createAssumption("second");
final UnionAssumption union = new UnionAssumption(first, second);
first.invalidate();
assertFalse(union.isValid());
}
use of com.oracle.truffle.api.utilities.UnionAssumption in project graal by oracle.
the class UnionAssumptionTest method testSecondInvalidateCheck.
@Test(expected = InvalidAssumptionException.class)
public void testSecondInvalidateCheck() throws InvalidAssumptionException {
final Assumption first = Truffle.getRuntime().createAssumption("first");
final Assumption second = Truffle.getRuntime().createAssumption("second");
final UnionAssumption union = new UnionAssumption(first, second);
second.invalidate();
union.check();
}
use of com.oracle.truffle.api.utilities.UnionAssumption in project graal by oracle.
the class UnionAssumptionTest method testFirstInvalidateCheck.
@Test(expected = InvalidAssumptionException.class)
public void testFirstInvalidateCheck() 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();
union.check();
}
use of com.oracle.truffle.api.utilities.UnionAssumption in project graal by oracle.
the class UnionAssumptionTest method testSecondInvalidateIsValid.
@Test
public void testSecondInvalidateIsValid() {
final Assumption first = Truffle.getRuntime().createAssumption("first");
final Assumption second = Truffle.getRuntime().createAssumption("second");
final UnionAssumption union = new UnionAssumption(first, second);
second.invalidate();
assertFalse(union.isValid());
}
Aggregations