aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-24 15:32:55 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-24 15:32:55 -0500
commit71b7392b089ddc69579067bc86488365796f4672 (patch)
tree2dd81bf947c5b91f6c73149d76c6f127bb5152f5
parent0591d3db3a10f5b7e8788a856b708dd0c14a971e (diff)
Enum table test
-rw-r--r--test/enums.nl7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/enums.nl b/test/enums.nl
index 8ba90fe6..31a93f84 100644
--- a/test/enums.nl
+++ b/test/enums.nl
@@ -18,3 +18,10 @@ enum Foo(Zero, One(x:Int), Two(x,y:Int))
>> Foo__One(10) < Foo__Two(1, 2)
= yes
+
+>> x := Foo__One(123)
+>> t := {x=>"found"; default="missing"}
+>> t[x]
+= "found"
+>> t[Foo__Zero()]
+= "missing"