@Test public void cmp_word() { assertThat(CMP.compare( array(1, 2, 3, 4, 5, 6, 7, 8), 0, 8, array(1, 2, 3, 4, 5, 6, 7, 8), 0, 8), is(equalTo(0))); assertThat(CMP.compare( array(1, 2, 3, 4, 5, 6, 7, 8), 0, 8, array(0, 1, 2, 3, 4, 5, 6, 7, 8, 0), 1, 8), is(equalTo(0))); assertThat(CMP.compare( array(1, 2, 3, 4, 5, 6, 7, 8), 0, 8, array(1, 2, 3, 4, 5, 6, 7, 0), 0, 8), is(greaterThan(0))); assertThat(CMP.compare( array(1, 2, 3, 4, 5, 6, 7, 0), 0, 8, array(1, 2, 3, 4, 5, 6, 7, 8), 0, 8), is(lessThan(0))); assertThat(CMP.compare( array(1, 2, 3, 4, 5, 6, 7, 8), 0, 8, array(1, 2, 3, 4, 5, 6, 7, 0xff), 0, 8), is(lessThan(0))); assertThat(CMP.compare( array(1, 2, 3, 4, 5, 6, 7, 0xff), 0, 8, array(1, 2, 3, 4, 5, 6, 7, 8), 0, 8), is(greaterThan(0))); assertThat(CMP.compare( array(1, 2, 3, 4, 5, 6, 7, 0), 0, 8, array(0, 2, 3, 4, 5, 6, 7, 8), 0, 8), is(greaterThan(0))); assertThat(CMP.compare( array(0, 2, 3, 4, 5, 6, 7, 8), 0, 8, array(1, 2, 3, 4, 5, 6, 7, 0), 0, 8), is(lessThan(0))); }
@Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { return compareBytes(b1, s1, l1, b2, s2, l2); }
PureByteArrayComparator implements ByteArrayComparator { @Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { return compareBytes(b1, s1, l1, b2, s2, l2); } }
PureByteArrayComparator implements ByteArrayComparator { @Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { return compareBytes(b1, s1, l1, b2, s2, l2); }  }
PureByteArrayComparator implements ByteArrayComparator { @Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { return compareBytes(b1, s1, l1, b2, s2, l2); }  @Override boolean equals(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2); @Override int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2); }
PureByteArrayComparator implements ByteArrayComparator { @Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { return compareBytes(b1, s1, l1, b2, s2, l2); }  @Override boolean equals(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2); @Override int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2);  }