use of org.graalvm.compiler.core.common.util.UnsignedLong in project graal by oracle.
the class UnsignedLongTest method testPlusException2.
@Test(expected = ArithmeticException.class)
public void testPlusException2() {
UnsignedLong longUnsigned = new UnsignedLong(0xffff_ffff_ffff_fff0L);
longUnsigned.plus(42);
}
use of org.graalvm.compiler.core.common.util.UnsignedLong in project graal by oracle.
the class UnsignedLongTest method testMinus.
@Test
public void testMinus() {
UnsignedLong fortyTwo = new UnsignedLong(42);
Assert.assertEquals(0, fortyTwo.minus(42).asLong());
Assert.assertEquals(40, fortyTwo.minus(2).asLong());
UnsignedLong longUnsigned = new UnsignedLong(0xffff_ffff_ffff_fff0L);
Assert.assertEquals(0, longUnsigned.minus(0xffff_ffff_ffff_fff0L).asLong());
}
use of org.graalvm.compiler.core.common.util.UnsignedLong in project graal by oracle.
the class UnsignedLongTest method testPlus.
@Test
public void testPlus() {
UnsignedLong fortyTwo = new UnsignedLong(42);
Assert.assertEquals(84, fortyTwo.plus(42).asLong());
Assert.assertEquals(44, fortyTwo.plus(2).asLong());
UnsignedLong longUnsigned = new UnsignedLong(0xffff_ffff_ffff_fff0L);
Assert.assertEquals(0xffff_ffff_ffff_ffffL, longUnsigned.plus(0xf).asLong());
}
use of org.graalvm.compiler.core.common.util.UnsignedLong in project graal by oracle.
the class UnsignedLongTest method testPlusException.
@Test(expected = ArithmeticException.class)
public void testPlusException() {
UnsignedLong fortyTwo = new UnsignedLong(42);
fortyTwo.plus(0xffff_ffff_ffff_fff0L);
}
Aggregations