Skip to content

wanted: more/easier automated tests #12

@jwaldmann

Description

@jwaldmann

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions