-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor test logic. Break general stages into substages
In PR #421, tests were unintentionally passing due to expected files being overwritten regardless of whether the generated solutions matched Conjure’s solutions. This commit refactors the integration_test_inner function and related file I/O utilities so that: * When ACCEPT=false, tests still compare generated outputs (parse, rewrite, solutions, and traces) against the expected results as before. * When ACCEPT=true, tests now first verify that the generated solutions match the Conjure solutions. Only if they match are the expected files updated. If they don’t match, the test fails without updating the expected files. Stages desciption: 1a: Parse (Convert the Essence model into an internal format.) 1b: Check against other parser(s) (Compare output from different parsing methods (e.g., native parser vs JSON parser).) 2a: Rewrite (Apply transformations to the parsed model (e.g., simplifying expressions, normalizing).) 2b: Check model properties (extra_asserts) (Verify additional model properties (e.g., ensure vector operators are evaluated).) 3a: Solve (Run the model through the solver to find solutions.) 3b: Check solutions against Conjure (Compare solutions with expected output from the Conjure solver.) 4a: Check that the generated rules match expected traces
- Loading branch information
1 parent
0ef8705
commit 74fbd4b
Showing
2 changed files
with
279 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.