use of org.neo4j.kernel.impl.store.PropertyType in project neo4j by neo4j.
the class DynamicRecordCheckTest method shouldReportCorrectTypeBasedOnProperBitsOnly.
@Test
public void shouldReportCorrectTypeBasedOnProperBitsOnly() throws Exception {
// given
DynamicRecord property = inUse(record(42));
// Type is 9, which is string, but has an extra bit set at a higher up position
int type = PropertyType.STRING.intValue();
type = type | 0b10000000;
property.setType(type);
// when
PropertyType reportedType = property.getType();
// then
// The type must be string
assertEquals(PropertyType.STRING, reportedType);
// but the type data must be preserved
assertEquals(type, property.getTypeAsInt());
}
Aggregations