super(TestAddressFormat.class.getSimpleName());
}
public void testAddressFormat() {
int offset, segment, dataSize;
AddressFormat af = new AddressFormat();
// Test 1
offset = 12345;
segment = 24;
dataSize = (1 << DynamicConstants.SUB_ARRAY_BITS) - 1;
check(af, offset, segment, dataSize);
// Test 2
offset = 12345;
segment = 24;
dataSize = (1 << DynamicConstants.SUB_ARRAY_BITS);
check(af, offset, segment, dataSize);
// Test 3
offset = 12345;
segment = 24;
dataSize = 0;
check(af, offset, segment, dataSize);
// Test 4
offset = Integer.MAX_VALUE;
segment = 24;
dataSize = 1023;
check(af, offset, segment, dataSize);
// Test 5
offset = 0;
segment = 24;
dataSize = 1023;
check(af, offset, segment, dataSize);
// Test 6
offset = 0;
segment = 24;
dataSize = af.getMaxDataSize();
check(af, offset, segment, dataSize);
}