Ejemplo n.º 1
0
 @Test
 public void testToString() {
   assertThat(UINT64.ZERO.toString(), is("0x0000000000000000"));
   assertThat(V1.toString(), is("0x0000000000000001"));
   assertThat(V2.toString(), is("0x0000000000000002"));
   assertThat(V3.toString(), is("0x0000000000000003"));
   assertThat(UINT64.MAX_VALUE.toString(), is("0xffffffffffffffff"));
 }
Ejemplo n.º 2
0
  @Test
  public void readMaxValue() throws IOException {
    // given
    InputStream given = new ByteArrayInputStream(UINT64.MAX_VALUE.bytes());

    // expected
    UINT64 expected = UINT64.MAX_VALUE;

    // act
    UINT64 actual = UINT64.read(given);

    // verify
    assertThat(actual, is(expected));
  }