Skip to content

Commit 39d8530

Browse files
committed
improved test
1 parent 350e84f commit 39d8530

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jbbp/src/test/java/com/igormaznitsa/jbbp/compiler/conversion/JBBPToJavaConverterReadWriteTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,11 @@ public void testReadWite_Double_SingleValue() throws Exception {
307307
@Test
308308
public void testReadWite_UInt_SingleValue() throws Exception {
309309
final Object instance = compileAndMakeInstance("uint value;");
310-
final byte[] etalon = new byte[] {1, 2, 3, 4};
310+
final byte[] etalon = new byte[] {(byte) 0xFF, 2, 3, 4};
311311

312312
callRead(instance, etalon.clone());
313313

314-
assertEquals(0x01020304L, getField(instance, "value", Long.class).longValue());
314+
assertEquals(0xFF020304L, getField(instance, "value", Long.class).longValue());
315315
assertArrayEquals(etalon, callWrite(instance));
316316
}
317317

@@ -338,12 +338,12 @@ public void testReadWite_UIntArrayWholeStream() throws Exception {
338338
assertNull(getField(instance, "uintarray", long[].class), "by default must be null");
339339

340340
final byte[] etalon =
341-
new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 22, 33};
341+
new byte[] {(byte) 0xFF, 2, 3, 4, 5, 6, 7, 8, 9, 0, 22, 33};
342342

343343
callRead(instance, etalon.clone());
344344

345345
assertArrayEquals(
346-
new long[] {0x01020304L, 0x05060708L, 0x09001621L},
346+
new long[] {0xFF020304L, 0x05060708L, 0x09001621L},
347347
getField(instance, "uintarray", long[].class));
348348
assertArrayEquals(etalon, callWrite(instance));
349349
}

0 commit comments

Comments
 (0)