Search in sources :

Example 1 with NeverValidAssumption

use of com.oracle.truffle.api.utilities.NeverValidAssumption in project graal by oracle.

the class NeverValidAssumptionTest method testIsValid.

@Test
public void testIsValid() {
    final NeverValidAssumption assumption = NeverValidAssumption.INSTANCE;
    assertFalse(assumption.isValid());
}
Also used : NeverValidAssumption(com.oracle.truffle.api.utilities.NeverValidAssumption) Test(org.junit.Test)

Example 2 with NeverValidAssumption

use of com.oracle.truffle.api.utilities.NeverValidAssumption in project graal by oracle.

the class NeverValidAssumptionTest method testCheck.

@Test
public void testCheck() {
    final NeverValidAssumption assumption = NeverValidAssumption.INSTANCE;
    try {
        assumption.check();
        fail();
    } catch (InvalidAssumptionException e) {
    } catch (Exception e) {
        fail();
    }
}
Also used : NeverValidAssumption(com.oracle.truffle.api.utilities.NeverValidAssumption) InvalidAssumptionException(com.oracle.truffle.api.nodes.InvalidAssumptionException) InvalidAssumptionException(com.oracle.truffle.api.nodes.InvalidAssumptionException) Test(org.junit.Test)

Example 3 with NeverValidAssumption

use of com.oracle.truffle.api.utilities.NeverValidAssumption in project graal by oracle.

the class NeverValidAssumptionTest method testInvalidateDoesNothing.

@Test
public void testInvalidateDoesNothing() {
    final NeverValidAssumption assumption = NeverValidAssumption.INSTANCE;
    assumption.invalidate();
    assumption.invalidate();
    assumption.invalidate();
}
Also used : NeverValidAssumption(com.oracle.truffle.api.utilities.NeverValidAssumption) Test(org.junit.Test)

Aggregations

NeverValidAssumption (com.oracle.truffle.api.utilities.NeverValidAssumption)3 Test (org.junit.Test)3 InvalidAssumptionException (com.oracle.truffle.api.nodes.InvalidAssumptionException)1