add error handle; VlInt

This commit is contained in:
free will committed 2021-03-17 10:34:32 +08:00
1 parent 17e35f10d0
commit de55943194
6 files changed
+131 -48

No files matched your search

+3
View File
@@ -214,18 +214,21 @@ import static org.junit.Assert.*;
byte b3 = 0x7f;
byte b4 = (byte) 0x80;
byte b5 = (byte) 0xff;
byte b6=(byte)0xf1;
ByteHelper byteHelper = new ByteHelper();
int a1 = byteHelper.uint8ToInt(b1);
int a2 = byteHelper.uint8ToInt(b2);
int a3 = byteHelper.uint8ToInt(b3);
int a4 = byteHelper.uint8ToInt(b4);
int a5 = byteHelper.uint8ToInt(b5);
int a6=byteHelper.uint8ToInt(b6);
assertEquals(a1,0);
assertEquals(a2,1);
assertEquals(a3,127);
assertEquals(a4,128);
assertEquals(a5,255);
assertEquals(a6,241);
}
@Test