updated tests
This commit is contained in:
parent
6b8236dc3b
commit
15506e2c08
|
@ -1,4 +1,4 @@
|
|||
from assembler.util import can_be_mark, can_convert_to_int, autoint
|
||||
from assembler.util import can_be_mark, can_convert_to_int, autoint, int16_2_bytes
|
||||
|
||||
|
||||
def test_can_be_mark():
|
||||
|
@ -33,3 +33,8 @@ def test_autoint():
|
|||
assert autoint("0b1010101") == 0b1010101
|
||||
assert autoint("'a'") == ord("a")
|
||||
assert autoint("'\\n'") == ord("\n")
|
||||
|
||||
def test_int16_2_bytes():
|
||||
assert int16_2_bytes(2) == b"\x02\00"
|
||||
assert int16_2_bytes(0x0200) == b"\x00\x02"
|
||||
assert int16_2_bytes(-1) == b"\xff\xff"
|
||||
|
|
Loading…
Reference in New Issue
Block a user