Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions kore/test/Test/Kore/Builtin/Int.hs
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,30 @@ test_unifyIntEq =
& Condition.fromPredicate
& simplifyCondition'
assertEqual "" [expect { term = () }] actual
, testCase "\\equals(X +Int 1 ==Int Y +Int 1, false)" $ do
let term1 =
eqInt
(addInt (mkElemVar x) (asInternal 1))
(addInt (mkElemVar y) (asInternal 1))
term2 = Test.Bool.asInternal False
expect =
makeEqualsPredicate_
(addInt (mkElemVar x) (asInternal 1))
(addInt (mkElemVar y) (asInternal 1))
& makeNotPredicate
& Condition.fromPredicate
& Pattern.fromCondition_
-- unit test
do
actual <- unifyIntEq term1 term2
assertEqual "" [Just expect] actual
-- integration test
do
actual <-
makeEqualsPredicate_ term1 term2
& Condition.fromPredicate
& simplifyCondition'
assertEqual "" [expect { term = () }] actual
]
where
x, y :: ElementVariable VariableName
Expand Down