aboutsummaryrefslogtreecommitdiff
path: root/test/bytes.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-21 17:44:08 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-21 17:44:08 -0400
commitc941b9a3325228eba404455afea7ccea0da45095 (patch)
treed4ca88c6848ac2e6ceee635bb87add87ba6d2322 /test/bytes.tm
parent1cec086a6034ad546977cae7aeaf4bb876d21970 (diff)
Fix tests
Diffstat (limited to 'test/bytes.tm')
-rw-r--r--test/bytes.tm27
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