monadiccp icon indicating copy to clipboard operation
monadiccp copied to clipboard

wanted: more/easier automated tests

Open jwaldmann opened this issue 7 years ago • 0 comments

Both as documentation for newcomers (= my students), and for quality assurance, I'd want more automated tests (mentionend in the cabal file, so they will be run under CI).

I put one example there already (Olympic) but I needed to patch the source (set the solver to use)

main = withArgs ["overton_run"] $ example_sat_main_void model

This "overton_run" seems to be the only solver available? https://github.com/letmaik/monadiccp/blob/master/src/Control/CP/FD/Example.hs#L79

When I try to run other examples, I am getting a variety of errors, e.g.,

stack exec -- runghc examples/Domino.hs overton_run
Domino.hs: Prelude.head: empty list

I can guess that it needs a command line argument, but then

stack exec -- runghc examples/Domino.hs overton_run 3
Domino.hs: constant collections not yet supported by overton interface

I think it would be good to

  • convert tests so that they also work without arguments (if they need some input, then there should be a default) (it is impossible to specify test arguments in a cabal file)
  • mark those tests that are supposed to work (with the given back-end), and run them in CI

jwaldmann avatar Apr 26 '18 08:04 jwaldmann