@@ -66,13 +66,7 @@ describe('At tests', () => {
6666
6767describe ( 'More read test' , ( ) => {
6868 it ( 'Test read big int from buffer' , ( ) => {
69- const buf = new DynamicBuffer ( ) ;
70-
71- buf [ 4 ] = 0xff ;
72- buf [ 5 ] = 0xff ;
73- buf [ 6 ] = 0xff ;
74- buf [ 7 ] = 0xff ;
75- // 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff
69+ const buf = new DynamicBuffer ( new Uint8Array ( [ 0 , 0 , 0 , 0 , 0xff , 0xff , 0xff , 0xff ] ) ) ;
7670
7771 assert . equal ( buf . readBigInt64BE ( ) , 4294967295n ) ;
7872 assert . equal ( buf . readBigInt64LE ( ) , - 4294967296n ) ;
@@ -94,13 +88,7 @@ describe('More read test', () => {
9488 } ) ;
9589
9690 it ( 'Test read int from buffer' , ( ) => {
97- const buf = new DynamicBuffer ( ) ;
98- buf [ 0 ] = 0x12 ;
99- buf [ 1 ] = 0x34 ;
100- buf [ 2 ] = 0x56 ;
101- buf [ 3 ] = 0x78 ;
102- buf [ 4 ] = 0x90 ;
103- buf [ 5 ] = 0xab ;
91+ const buf = new DynamicBuffer ( new Uint8Array ( [ 0x12 , 0x34 , 0x56 , 0x78 , 0x90 , 0xab ] ) ) ;
10492
10593 const be = [ 0x12 , 0x1234 , 0x123456 , 0x12345678 , 0x1234567890 , 0x1234567890ab ] ;
10694 const le = [ 0x12 , 0x3412 , 0x563412 , 0x78563412 , 0x9078563412 , 0xab9078563412 ] ;
0 commit comments