diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-07-11 16:05:54 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-07-11 16:05:54 -0400 |
| commit | 4153c0af9d4dcc43c0a67cc446a313c46ee5ac33 (patch) | |
| tree | 246154cdf41f487f6d2da2c6b6df5aba50531ab6 /test/structs.tm | |
| parent | a51d48201b5245dc2cc2bfb00e0ac8e7b52203d9 (diff) | |
| parent | 46b0dbc5a448249ddc9a6ce20465f0fa41de6d64 (diff) | |
Merge branch 'main' into decimalsdecimals
Diffstat (limited to 'test/structs.tm')
| -rw-r--r-- | test/structs.tm | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/test/structs.tm b/test/structs.tm index c340f1c9..a58a9ef7 100644 --- a/test/structs.tm +++ b/test/structs.tm @@ -15,23 +15,18 @@ func test_literals() = Pair(x=10, y=20) >> y := Pair(y=20, 10) = Pair(x=10, y=20) - >> x == y - = yes - >> x == Pair(-1, -2) - = no + assert x == y + assert x != Pair(-1, -2) func test_metamethods() >> x := Pair(10, 20) >> y := Pair(100, 200) >> x == y = no - >> x == Pair(10, 20) - = yes - >> x == Pair(10, 30) - = no + assert x == Pair(10, 20) + assert x != Pair(10, 30) - >> x < Pair(11, 20) - = yes + assert x < Pair(11, 20) >> set := |x| >> set.has(x) = yes @@ -43,12 +38,9 @@ func test_mixed() >> y := Mixed(99, "Hello") >> x == y = no - >> x == Mixed(10, "Hello") - = yes - >> x == Mixed(10, "Bye") - = no - >> x < Mixed(11, "Hello") - = yes + assert x == Mixed(10, "Hello") + assert x != Mixed(10, "Bye") + assert x < Mixed(11, "Hello") >> set := |x| >> set.has(x) = yes |
