use of org.neo4j.kernel.impl.store.format.standard.DynamicRecordFormat in project neo4j by neo4j.
the class BaseRecordFormatTest method shouldRecognizeDesignatedInUseBit.
@Test
void shouldRecognizeDesignatedInUseBit() {
// GIVEN
RecordFormat<DynamicRecord> format = new DynamicRecordFormat();
PageCursor cursor = new StubPageCursor(0, 1_000);
byte inUseByte = 0;
for (int i = 0; i < 8; i++) {
// WHEN
cursor.setOffset(68);
cursor.putByte(cursor.getOffset(), inUseByte);
// THEN
assertEquals(shouldBeInUse(inUseByte), format.isInUse(cursor));
inUseByte <<= 1;
inUseByte |= 1;
}
}
Aggregations