diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-25 15:40:59 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-25 15:40:59 -0400 |
| commit | 1f9147187d66e95a0ffedd4d5595ec98646b5fe1 (patch) | |
| tree | 14281e5cbde8e15fae63953b72844fb1a11d6f73 /test/tables.tm | |
| parent | d88d8648dc7802fbeac2f28dc5f2ef8fdfe1a9e4 (diff) | |
Make docstring tests use an actual expression AST instead of text
matching
Diffstat (limited to 'test/tables.tm')
| -rw-r--r-- | test/tables.tm | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/tables.tm b/test/tables.tm index c97c35a0..9749835d 100644 --- a/test/tables.tm +++ b/test/tables.tm @@ -3,11 +3,11 @@ func main(): = {"one"=1, "two"=2} >> t["one"] - = 1 : Int? + = 1? >> t["two"] - = 2 : Int? + = 2? >> t["???"] - = none : Int? + = none:Int >> t["one"]! = 1 >> t["???"] or -1 @@ -22,7 +22,7 @@ func main(): >> t.length = 2 >> t.fallback - = none : {Text,Int}? + = none : {Text,Int} >> t.keys = ["one", "two"] @@ -33,16 +33,16 @@ func main(): = {"three"=3; fallback={"one"=1, "two"=2}} >> t2["one"] - = 1 : Int? + = 1? >> t2["three"] - = 3 : Int? + = 3? >> t2["???"] - = none : Int? + = none:Int >> t2.length = 1 >> t2.fallback - = {"one"=1, "two"=2} : {Text,Int}? + = {"one"=1, "two"=2}? t2_str := "" for k,v in t2: @@ -95,11 +95,11 @@ func main(): = no >> {1=1, 2=2} <> {2=2, 1=1} - = 0 + = Int32(0) >> [{:Int,Int}, {0=0}, {99=99}, {1=1, 2=2, 3=3}, {1=1, 99=99, 3=3}, {1=1, 2=-99, 3=3}, {1=1, 99=-99, 3=4}]:sorted() - = [{}, {0=0}, {1=1, 2=-99, 3=3}, {1=1, 2=2, 3=3}, {1=1, 99=99, 3=3}, {1=1, 99=-99, 3=4}, {99=99}] + = [{:Int,Int}, {0=0}, {1=1, 2=-99, 3=3}, {1=1, 2=2, 3=3}, {1=1, 99=99, 3=3}, {1=1, 99=-99, 3=4}, {99=99}] >> [{:Int}, {1}, {2}, {99}, {0, 3}, {1, 2}, {99}]:sorted() - = [{}, {0, 3}, {1}, {1, 2}, {2}, {99}, {99}] + = [{:Int}, {0, 3}, {1}, {1, 2}, {2}, {99}, {99}] |
