File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ describe('BytesIter', () => {
99 } )
1010
1111 it ( 'should iterate as String ' , ( ) => {
12- const iter = BytesIter . String ( '0xdeadbeef' )
12+ const iter = BytesIter . HexString ( '0xdeadbeef' )
1313 expect ( iter . nextByte ( ) ) . toEqual ( '0xde' )
1414 expect ( iter . nextByte ( ) ) . toEqual ( '0xad' )
1515 expect ( iter . nextBytes ( 2 ) ) . toEqual ( '0xbeef' )
1616 } )
1717
1818 it ( 'should iterate in reverse ' , ( ) => {
19- const iter = BytesIter . String ( '0xdeadbeef' )
19+ const iter = BytesIter . HexString ( '0xdeadbeef' )
2020 expect ( iter . nextByte ( BytesIter . SIDE . Back ) ) . toEqual ( '0xef' )
2121 expect ( iter . nextByte ( BytesIter . SIDE . Back ) ) . toEqual ( '0xbe' )
2222 expect ( iter . nextBytes ( 2 , BytesIter . SIDE . Back ) ) . toEqual ( '0xdead' )
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export class BytesIter<T> {
3434 return new BytesIter ( bytes , BigInt )
3535 }
3636
37- static String ( bytes : string ) : BytesIter < string > {
37+ static HexString ( bytes : string ) : BytesIter < string > {
3838 return new BytesIter ( bytes , String )
3939 }
4040
You can’t perform that action at this time.
0 commit comments