Пример #1
0
  public void testHashCode() {
    buf.clear();
    DoubleBuffer readonly = buf.asReadOnlyBuffer();
    DoubleBuffer duplicate = buf.duplicate();
    assertTrue(buf.hashCode() == readonly.hashCode());

    assertTrue(buf.capacity() > 5);
    duplicate.position(buf.capacity() / 2);
    assertTrue(buf.hashCode() != duplicate.hashCode());
  }
  @TestTargetNew(
      level = TestLevel.PARTIAL_COMPLETE,
      notes = "",
      method = "hashCode",
      args = {})
  public void testHashCode() {
    buf.clear();
    DoubleBuffer readonly = buf.asReadOnlyBuffer();
    DoubleBuffer duplicate = buf.duplicate();
    assertTrue(buf.hashCode() == readonly.hashCode());

    assertTrue(buf.capacity() > 5);
    duplicate.position(buf.capacity() / 2);
    assertTrue(buf.hashCode() != duplicate.hashCode());
  }