This package contains only the integration/e2e tests for both fdo and fdp.
See fdq for details.
fdo is a brute force finite domain constraint solver.
fdp is a finite domain constraint problem reduction system.
Since FDP should be sound when reducing a problem, it must mean FDO should have the same result with and without FDP. So we can run the same test suite on both packages. In theory FDP should be slightly faster though that won't likely be the case on small or even medium problems (but the performance cliff is steep and wild).
The tests have cultivated in two separated repositories for a long time before being merged. Work is still done to merge and dedupe these.
Unit tests or tests for a specific package should still go in their respectful packages test dirs.
The tests mostly rely on a basic verifier which takes an input problem and line-by-line asserts the constraint in each line to the result of the test. This verifier is limited in that it it's (currently) incapable of asserting "complex" constraints. This would be constraints that use grouping, nesting, or anything beyond a single constraint per line in the A @ B
, R = A @ B
, R = call?(args)
, R = call(args)
, and call(args)
forms. You can have the verifier skip the actual assertion part so it should be fine.
See the fdo and fdp packages for details.
The constraint language is custom and described in the docs of fdq.