Skip to content

Commit 2887c5f

Browse files
committedFeb 27, 2025
adapt tests for simplify/solve-eqs tactic
This change fixes IagoAbal#94. Both the tutorial examples and another example, failed due to change in z3's simplify/solve-eq tactics. The tests are adapted accordingly.
1 parent b77a17e commit 2887c5f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎test/Z3/Base/Spec.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,5 +541,5 @@ spec = around withContext $ do
541541
simplify <- Z3.mkTactic ctx "solve-eqs"
542542
tactic <- Z3.repeatTactic ctx simplify 10
543543
Z3.applyResultToString ctx =<< Z3.applyTactic ctx tactic goal)
544-
`shouldReturn` "(goals\n(goal\n (or (not (<= (- 2.0) y)) (not (<= y (- 2.0))))\n (not (<= 0.0 y)))\n)"
544+
`shouldReturn` "(goals\n(goal\n (or (not (<= 0.0 x)) (not (<= x 0.0)))\n (not (<= 2.0 x)))\n)"
545545

‎test/Z3/Tutorial.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec = do
1818
describe "Section: Strategies" $ do
1919
describe "Section: Introduction" $ do
2020
it "Apply simplify and solve-eq tactics" $
21-
Z3.Monad.evalZ3 simplifySolveEqs `shouldReturn` "(goals\n(goal\n (not (<= y (- 2.0)))\n (not (<= y 0.0)))\n)"
21+
Z3.Monad.evalZ3 simplifySolveEqs `shouldReturn` "(goals\n(goal\n (not (<= x 0.0))\n (not (<= x 2.0)))\n)"
2222
it "Apply split-clause tactic" $
2323
Z3.Monad.evalZ3 applySplitClause `shouldReturn` "(goals\n(goal\n (< x 0.0)\n (= x (+ y 1.0))\n (< y 0.0))\n(goal\n (> x 0.0)\n (= x (+ y 1.0))\n (< y 0.0))\n)"
2424

0 commit comments

Comments
 (0)
Please sign in to comment.