diff options
Diffstat (limited to 'test/bytes.tm')
| -rw-r--r-- | test/bytes.tm | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/test/bytes.tm b/test/bytes.tm index a207c633..b137aeb6 100644 --- a/test/bytes.tm +++ b/test/bytes.tm @@ -1,25 +1,16 @@ func main() say("Test bytes:") - >> Byte(100) - = Byte(0x64) + assert Byte(100) == Byte(0x64) - >> Byte(0xFF) - = Byte(0xFF) + assert Byte(0xFF) == Byte(0xFF) >> b := Byte(0x0F) - >> b.hex() - = "0F" - >> b.hex(prefix=yes) - = "0x0F" - >> b.hex(uppercase=no) - = "0f" + assert b.hex() == "0F" + assert b.hex(prefix=yes) == "0x0F" + assert b.hex(uppercase=no) == "0f" - >> Byte(0x06).get_bit(1) - = no - >> Byte(0x06).get_bit(2) - = yes - >> Byte(0x06).get_bit(3) - = yes - >> Byte(0x06).get_bit(4) - = no + assert Byte(0x06).get_bit(1) == no + assert Byte(0x06).get_bit(2) == yes + assert Byte(0x06).get_bit(3) == yes + assert Byte(0x06).get_bit(4) == no |
