@Test public void test_int64_t() throws IOException { for (Long exp : expected_int64) { SignedLong result = binFileReader.int64_t(); assertEquals("int64_t " + exp + " getSignedValue()", exp, result.getSignedValue()); assertEquals("int64_t " + exp + " toString()", exp.toString(), result.toString()); } }
@Test public void test_uint64_t() throws IOException { for (Long exp : expected_uint64) { UnsignedLong result = binFileReader.uint64_t(); assertEquals("uint64_t " + exp + " getSignedValue()", exp, result.getSignedValue()); assertEquals( "uint64_t " + exp + " toString()", Long.toString(exp < 0 ? exp + 256 : exp), result.toString()); } }
@Test public void test_int32_t() throws IOException { for (Long exp : expected_int32) { SignedInteger result = binFileReader.int32_t(); assertEquals("int32_t " + exp + " asInt()", exp, result.asLong()); assertEquals( "int32_t " + exp + " getSignedValue()", (Integer) exp.intValue(), result.getSignedValue()); assertEquals("int32_t " + exp + " toString()", exp.toString(), result.toString()); } }