philadelphia-core: Improve 'FIXValue#byteAt' test
Test with an integer rather than a string to ensure that the offset
is handled correctly.
@@ -39,14 +39,16 @@ class FIXValueTest {
@Test
void byteAt() {
- value.setString("FOO");
+ value.setInt(123);
+
+ int length = value.length();
- byte[] bytes = new byte[value.length()];
+ byte[] bytes = new byte[length];
- for (int i = 0; i < value.length(); i++)
+ for (int i = 0; i < length; i++)
bytes[i] = value.byteAt(i);
- assertArrayEquals(new byte[] { 'F', 'O', 'O' }, bytes);
+ assertArrayEquals(new byte[] { '1', '2', '3' }, bytes);
}
@Test
