assertEquals("9223372036854775808L", n.rawValue());
}
@Test
public void testFromRaw() {
IntegralLiteral n = new IntegralLiteral();
n.rawValue("0");
assertEquals(LiteralType.DECIMAL, n.astLiteralType());
assertEquals(0, n.astIntValue());
assertFalse(n.astMarkedAsLong());
n.rawValue("00");
assertEquals(LiteralType.OCTAL, n.astLiteralType());
assertEquals(0, n.astIntValue());
assertFalse(n.astMarkedAsLong());
assertNull(n.getErrorReasonForValue());
n.rawValue("0x0");
assertEquals(LiteralType.HEXADECIMAL, n.astLiteralType());
assertEquals(0, n.astIntValue());
assertFalse(n.astMarkedAsLong());
n.rawValue("00L");
assertEquals(LiteralType.OCTAL, n.astLiteralType());
assertEquals(0, n.astLongValue());
assertTrue(n.astMarkedAsLong());
assertNull(n.getErrorReasonForValue());
n.rawValue("0x801291FD");
assertEquals(LiteralType.HEXADECIMAL, n.astLiteralType());
assertEquals(0x801291FD, n.astIntValue());
assertFalse(n.astMarkedAsLong());
assertNull(n.getErrorReasonForValue());
n.rawValue("0xAC45005D12DEAAFFL");
assertEquals(LiteralType.HEXADECIMAL, n.astLiteralType());
assertEquals(0xAC45005D12DEAAFFL, n.astLongValue());
assertTrue(n.astMarkedAsLong());
assertNull(n.getErrorReasonForValue());
n.rawValue("0xAC45005D12DEAAFF");
assertEquals(LiteralType.HEXADECIMAL, n.astLiteralType());
assertFalse(n.astMarkedAsLong());
assertNotNull(n.getErrorReasonForValue());
}