File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
booster/unit-tests/Test/Booster/Pattern Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import Booster.Pattern.Base
17
17
import Booster.Pattern.Match
18
18
import Booster.Syntax.Json.Internalise (trm )
19
19
import Test.Booster.Fixture
20
+ import Test.Booster.Pattern.InternalCollections
20
21
21
22
test_match_eval :: TestTree
22
23
test_match_eval =
@@ -28,6 +29,7 @@ test_match_eval =
28
29
, andTerms
29
30
, composite
30
31
, kmapTerms
32
+ , internalSets
31
33
]
32
34
33
35
symbols :: TestTree
@@ -293,6 +295,19 @@ cornerCases =
293
295
let v = var " X" someSort
294
296
in errors " identical variables" v v
295
297
298
+ internalSets :: TestTree
299
+ internalSets =
300
+ testGroup
301
+ " Internal sets"
302
+ [ test
303
+ " Can match an empty set with itself"
304
+ emptySet
305
+ emptySet
306
+ (success [] )
307
+ ]
308
+
309
+ ----------------------------------------
310
+
296
311
test :: String -> Term -> Term -> MatchResult -> TestTree
297
312
test name pat subj expected =
298
313
testCase name $ matchTerms Eval testDefinition pat subj @?= expected
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ test_match_implies =
32
32
, sorts
33
33
, injections
34
34
, internalLists
35
+ , internalSets
35
36
, internalMaps
36
37
]
37
38
@@ -377,6 +378,17 @@ internalLists =
377
378
378
379
klist = KList testKListDef
379
380
381
+ internalSets :: TestTree
382
+ internalSets =
383
+ testGroup
384
+ " Internal sets"
385
+ [ test
386
+ " Can match an empty set with itself"
387
+ emptySet
388
+ emptySet
389
+ (success [] )
390
+ ]
391
+
380
392
internalMaps :: TestTree
381
393
internalMaps =
382
394
testGroup
You can’t perform that action at this time.
0 commit comments