-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Improve constraint verifier error messages (#758)
This PR improves the error messages of the constraint verifier and adds two new methods: `justifiesWithExactly()` and `indictsWithExactly()`. The new messages will be formatted as follows: ## Justifications ``` Broken expectation. Justification: ai.timefold.solver.test.api.score.stream.testdata/Justify with first justification Expected: TestFirstJustification[id=2] Actual: TestFirstJustification[id=Generated Entity 0] TestFirstJustification[id=Generated Entity 1] TestFirstJustification[id=Generated Entity 2] Expected but not found: TestFirstJustification[id=2] Unexpected but found: TestFirstJustification[id=Generated Entity 0] TestFirstJustification[id=Generated Entity 1] TestFirstJustification[id=Generated Entity 2] ``` ## Indictments ``` Broken expectation. Indictment: ai.timefold.solver.test.api.score.stream.testdata/Justify with first justification Expected: TestdataConstraintVerifierFirstEntity(code='bad code') Actual: TestdataConstraintVerifierFirstEntity(code='Generated Entity 0') TestdataConstraintVerifierFirstEntity(code='Generated Entity 1') TestdataConstraintVerifierFirstEntity(code='Generated Entity 2') Expected but not found: TestdataConstraintVerifierFirstEntity(code='bad code') Unexpected but found: TestdataConstraintVerifierFirstEntity(code='Generated Entity 0') TestdataConstraintVerifierFirstEntity(code='Generated Entity 1') TestdataConstraintVerifierFirstEntity(code='Generated Entity 2') ```
- Loading branch information
Showing
4 changed files
with
434 additions
and
116 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
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
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.