Splits the test_helper module. There's now 2 of them:
src/test_helpers is exported from slicec and contains only functions that are generally useful to both slicec and the language compilers.
tests/test_helpers is not exported and contains all the functions that are specific to slicec.
Adds a new test helper named parse (slicec specific test helper). This function lets us reduce the number of compile_from_strings(&[slice], Some(options), |_| {}, |_| {}); we have everywhere.
This adds alot of boilerplate to the tests, at the benefit of making it impossible to accidentally call a slicec specific validation function in a language compiler. I'm honestly not sure this is worth it though.
This PR:
test_helper
module. There's now 2 of them:src/test_helpers
is exported fromslicec
and contains only functions that are generally useful to both slicec and the language compilers.tests/test_helpers
is not exported and contains all the functions that are specific to slicec.parse
(slicec specific test helper). This function lets us reduce the number ofcompile_from_strings(&[slice], Some(options), |_| {}, |_| {});
we have everywhere.This adds alot of boilerplate to the tests, at the benefit of making it impossible to accidentally call a
slicec
specific validation function in a language compiler. I'm honestly not sure this is worth it though.