feat(expression_domain_testing): Create a testing suite for expression domains#1630
feat(expression_domain_testing): Create a testing suite for expression domains#1630
Conversation
…I, remove unused imports, change feild visability
Documentation CoverageReport: https://conjure-cp.github.io/conjure-oxide-reports/pr/1630/coverage-docs/index.html This PR: 43.48% documented, 4.97% with examples (8/70/161) |
| type ParseFn = fn(&str, Arc<RwLock<Context<'static>>>) -> Result<Model, Box<ParseErrorCollection>>; | ||
|
|
||
| /// Runs a test for one model using each configured parser | ||
| fn expression_domain_test( |
There was a problem hiding this comment.
this function is completely copied from roundtrip testing. With the changes from #1548 , I can see:
- get
acceptenv var - get testconfig
- maybe clean the test dir
- run some test for every parser
as very standard in any testing framework. Should this be generalised?
All you would need to add would be a function pointer to the function signature so that it could run whatever function for each test (e.g. expression_domain_test_inner).
There was a problem hiding this comment.
Same is also true for the clean_test_dir_for_accept function, except that wouldn't need any modification
Code CoverageReport: https://conjure-cp.github.io/conjure-oxide-reports/pr/1630/coverage-code/index.html This PR: 73.00% lines (16621/22770) |
Description
Create a testing framework that will (in the short-term) check the result of
expression::domain_ofon some expression.In the longterm (not in this PR), this should extend to support some ac-style algorithm
Related issues
Uses the functions defined in #1624, and will help test #1547
Key changes
How to test/review
TBC