From 10795782c674df12fc70ea3aeeaa2f62158b6cbd Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 12 Sep 2024 13:17:53 -0400 Subject: Implement optional hashing/equality/comparisons --- test/optionals.tm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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?] -- cgit v1.2.3