File tree Expand file tree Collapse file tree 2 files changed +53
-1
lines changed Expand file tree Collapse file tree 2 files changed +53
-1
lines changed Original file line number Diff line number Diff line change 1
1
cabal-version : 2.2
2
2
3
- -- This file has been generated from package.yaml by hpack version 0.34.1 .
3
+ -- This file has been generated from package.yaml by hpack version 0.34.2 .
4
4
--
5
5
-- see: https://github.com/sol/hpack
6
6
@@ -954,6 +954,7 @@ test-suite kore-test
954
954
Test.Kore.IndexedModule.SortGraph
955
955
Test.Kore.Internal.ApplicationSorts
956
956
Test.Kore.Internal.Condition
957
+ Test.Kore.Internal.Key
957
958
Test.Kore.Internal.MultiAnd
958
959
Test.Kore.Internal.OrCondition
959
960
Test.Kore.Internal.OrPattern
Original file line number Diff line number Diff line change
1
+ module Test.Kore.Internal.Key
2
+ ( test_retractKey
3
+ ) where
4
+
5
+ import Prelude.Kore
6
+
7
+ import Test.Tasty
8
+
9
+ import Kore.Internal.TermLike
10
+ ( Concrete
11
+ , DomainValue (.. )
12
+ , TermLike
13
+ , mkDomainValue
14
+ , mkStringLiteral
15
+ , retractKey
16
+ )
17
+
18
+ import Test.Kore.Builtin.Definition
19
+ ( mkBool
20
+ , mkBytes
21
+ , mkInt
22
+ , mkList
23
+ , mkMap
24
+ , mkSet_
25
+ , mkString
26
+ , userTokenSort
27
+ )
28
+ import Test.Tasty.HUnit.Ext
29
+
30
+ test_retractKey :: [TestTree ]
31
+ test_retractKey =
32
+ [ test " Int" (mkInt 1 )
33
+ , test " Bool" (mkBool True )
34
+ , test " String" (mkString " string" )
35
+ , test " Bytes" (mkBytes [0x00 , 0xFF ])
36
+ , test " Set" (mkSet_ [mkInt 1 ])
37
+ , test " Map" (mkMap [(mkInt 1 , mkString " one" )])
38
+ , test " List" (mkList [mkInt 1 , mkInt 2 ])
39
+ , test " token"
40
+ (mkDomainValue DomainValue
41
+ { domainValueSort = userTokenSort
42
+ , domainValueChild = mkStringLiteral " token"
43
+ }
44
+ )
45
+ ]
46
+ where
47
+ test :: HasCallStack => TestName -> TermLike Concrete -> TestTree
48
+ test testName term =
49
+ testCase testName $ do
50
+ let actual = retractKey term
51
+ assertBool " expected key" (isJust actual)
You can’t perform that action at this time.
0 commit comments