diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/tables.tm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/tables.tm b/test/tables.tm index 7b1ac22c..2eb1409e 100644 --- a/test/tables.tm +++ b/test/tables.tm @@ -77,3 +77,13 @@ func main() assert counter.has("y") == no >> counter["y"] += 1 + + do + # Set operations + a := {"A":1, "B":2, "C":3} + b := {"B":2, "C":30, "D":40} + assert a.with(b) == {"A":1, "B":2, "C":30, "D":40} + assert a.with(b) == a ++ b + assert a.intersection(b) == {"B":2} + assert a.difference(b) == {"A":1, "D":40} + assert a.without(b) == {"A":1, "C":3} |
