aboutsummaryrefslogtreecommitdiff
path: root/test/optionals.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-12 13:17:53 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-12 13:17:53 -0400
commit10795782c674df12fc70ea3aeeaa2f62158b6cbd (patch)
tree4998775cf740a86de78b4b1942cc8c40543965de /test/optionals.tm
parent990846debb5593f85648c82abe4d59398ecd80fb (diff)
Implement optional hashing/equality/comparisons
Diffstat (limited to 'test/optionals.tm')
-rw-r--r--test/optionals.tm10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/optionals.tm b/test/optionals.tm
index 5c18d58d..a3f33d6c 100644
--- a/test/optionals.tm
+++ b/test/optionals.tm
@@ -274,3 +274,13 @@ func main():
>> maybe_int(yes)!
= 123 : Int
+
+ # Test comparisons, hashing, equality:
+ >> (!Int == 5?)
+ = no
+ >> (5? == 5?)
+ = yes
+ >> {!Int, !Int}
+ = {!Int}
+ >> [5?, !Int, !Int, 6?]:sorted()
+ = [!Int, !Int, 5?, 6?]