smtlib-backends-tests 0.2 → 0.3
raw patch · 3 files changed
+37/−23 lines, 3 filesdep ~basedep ~smtlib-backendsdep ~tastyPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, smtlib-backends, tasty
API changes (from Hackage documentation)
Files
- CHANGELOG.md +16/−2
- smtlib-backends-tests.cabal +4/−4
- src/SMTLIB/Backends/Tests.hs +17/−17
CHANGELOG.md view
@@ -1,3 +1,17 @@-# v0.2-- remove `(exit)` commands at the end of sources+# Changelog++All notable changes to the smtlib-backends-tests library will be documented in+this file.++## v0.3 _(2023-02-03)_++### Changed+- make test-suite compatible with `smtlib-backends-0.3`++## v0.2 _(2022-12-16)_++### Changed - make library compatible with `smtlib-backends-0.2`++### Removed+- remove `(exit)` commands at the end of sources
smtlib-backends-tests.cabal view
@@ -1,5 +1,5 @@ name: smtlib-backends-tests-version: 0.2+version: 0.3 synopsis: Testing SMT-LIB backends. description: This library provides common functions and values used for testing SMT-LIB@@ -22,7 +22,7 @@ source-repository this type: git location: https://github.com/tweag/smtlib-backends- tag: 0.2+ tag: 0.3 subdir: smtlib-backends-tests library@@ -31,8 +31,8 @@ exposed-modules: SMTLIB.Backends.Tests other-modules: SMTLIB.Backends.Tests.Sources build-depends:- base >=4.14 && <4.17.0- , smtlib-backends >=0.2 && <0.3+ base >=4.14 && <4.18+ , smtlib-backends >=0.3 && <0.4 , tasty >=1.4.2 && <1.5 , tasty-hunit >=0.10.0 && <0.11
src/SMTLIB/Backends/Tests.hs view
@@ -8,7 +8,7 @@ ) where -import SMTLIB.Backends (Backend, command, initSolver)+import SMTLIB.Backends (Backend, QueuingFlag (..), command, initSolver) import qualified SMTLIB.Backends.Tests.Sources as Src import Test.Tasty import Test.Tasty.HUnit@@ -25,20 +25,20 @@ TestTree testBackend name sources with = testGroup name $ do- lazyMode <- [False, True]- return $- testGroup- ( if lazyMode- then "lazy"- else "eager"+ queuing <- [NoQueuing, Queuing]+ return+ $ testGroup+ ( case queuing of+ Queuing -> "queuing"+ NoQueuing -> "no queuing" )- $ do- source <- sources- return $- testCase (Src.name source) $- with $ \backend -> do- solver <- initSolver backend lazyMode- Src.run source solver- -- ensure the sources consisting only of queued commands also run- _ <- command solver "(get-info :name)"- return ()+ $ do+ source <- sources+ return $+ testCase (Src.name source) $+ with $ \backend -> do+ solver <- initSolver queuing backend+ Src.run source solver+ -- ensure the sources consisting only of queued commands also run+ _ <- command solver "(get-info :name)"+ return ()