@Test public void testLongs() throws SyntaxException { long va = 0x1f; long vb = 0xf1; Operation bitior = BitIOR.newOperation(null, LongProperty.getInstance(va), LongProperty.getInstance(vb)); assertTrue(bitior instanceof LongProperty); LongProperty result = (LongProperty) bitior; long lvalue = result.getValue().longValue(); assertTrue((va | vb) == lvalue); }
@Test(expected = EvaluationException.class) public void testInvalidArgument() throws SyntaxException { HashResource h = new HashResource(); BitIOR.newOperation(null, h, h); }
@Test(expected = AssertionError.class) public void testOverflow() throws SyntaxException { LongProperty i = LongProperty.getInstance(1L); BitIOR.newOperation(null, i, i, i); }
@Test(expected = AssertionError.class) public void testUnderflow() throws SyntaxException { BitIOR.newOperation(null); }