Skip to content

Document testing custom propagators and variables - #6

Draft
zayenz wants to merge 3 commits into
mainfrom
feature/testing
Draft

zayenz wants to merge 3 commits into
mainfrom
feature/testing

Conversation

@zayenz

@zayenz zayenz commented Sep 6, 2026

Copy link
Copy Markdown
Member

Document how to test custom propagators and variable implementations with Gecode's installed test library. The Part P chapter tests the existing less propagator against an independent constraint specification and explains consistency checks, test tags, and failure reproduction. The library overview covers integer, set, and float constraint tests.

The variable implementation chapter includes a complete Test::Base example for MPG's integer interval variable. It checks bound updates, modification events, assignment, failure, and clone independence, with CMake instructions for a Gecode installation built with int.vis. Both test examples are attributed to Mikael Z. Lagerkvist.

The introductory build section describes the check, check-normal, and check-sweep targets. Example validation builds and runs the propagator test through the installed CMake component and the variable test against a kernel built with int.vis. The existing MPG test runner also supports Gecode's separate test-main.cpp entry point.

Companion to Gecode/gecode#237 and Gecode/gecode#238.

Validation:

  • make check-sources and make check with the companion Gecode checkout and test-library installation; 623 validation entries passed, 3 skipped, none failed.
  • make docs, including strict HTML and PDF builds.
  • Published variable-test CMake project built and run against a temporary Gecode installation configured with int.vis.
  • Installed propagator-test registration and deliberate constraint-specification fault checks.
  • Desktop and narrow-width HTML review, download attribution checks, and visual inspection of affected PDF pages.

@zayenz zayenz changed the title Document testing custom propagators with the Gecode test library Document testing custom propagators and variables Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant