Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnitTest additions #629

Merged
merged 7 commits into from
Dec 12, 2024
Merged

UnitTest additions #629

merged 7 commits into from
Dec 12, 2024

Conversation

joe-hauns
Copy link
Contributor

Miscellanious refactors to unit testing, allowing for different clause pattern to check against when running tests.
i.e. the new GenerationTester can not only check whether the result of a rule application is exactly some list of clauses (ExactlyStackMatcher) but also whether e.g. the resulting list contains some element ContainsStackMatcher, and simliar.

Further now in generation testing we distinguish between symetric and asymmetric test cases. in an asymmetric test case (which was the usual old TestCase before refactoring) we fill an index with some context literals (AsymmetricTest::context()) and then check the result of calling Rule::generateClauses(input) for some input clause (AsymmetricTest::input).
In a symmetric test there is no distinction between context and input. We run a couple of asymmetric tests using every clause in SymmetricTest::input as AsymmetricTest::input and the remaining clauses as AsymmetricTest::context.

@quickbeam123 quickbeam123 merged commit 5dbcc50 into master Dec 12, 2024
1 check passed
@quickbeam123 quickbeam123 deleted the test-additions branch December 12, 2024 12:35
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.

2 participants