Package com.orientechnologies.orient.core.serialization.serializer.record.binary

Examples of com.orientechnologies.orient.core.serialization.serializer.record.binary.BytesContainer.alloc()


  }

  @Test
  public void testReallocSimple() {
    BytesContainer bytesContainer = new BytesContainer();
    bytesContainer.alloc((short) 2050);
    assertTrue(bytesContainer.bytes.length > 2050);
    assertEquals(bytesContainer.offset, 2050);
  }

  @Test
View Full Code Here


  }

  @Test
  public void testBorderReallocSimple() {
    BytesContainer bytesContainer = new BytesContainer();
    bytesContainer.alloc((short) 1024);
    int pos = bytesContainer.alloc((short) 1);
    bytesContainer.bytes[pos] = 0;
    assertTrue(bytesContainer.bytes.length >= 1025);
    assertEquals(bytesContainer.offset, 1025);
  }
View Full Code Here

  @Test
  public void testBorderReallocSimple() {
    BytesContainer bytesContainer = new BytesContainer();
    bytesContainer.alloc((short) 1024);
    int pos = bytesContainer.alloc((short) 1);
    bytesContainer.bytes[pos] = 0;
    assertTrue(bytesContainer.bytes.length >= 1025);
    assertEquals(bytesContainer.offset, 1025);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.