Easy KCL tests with no engine/visuals (#3282)

This new test framework, `no_visuals`, is for testing KCL programs via asserts, not via twenty-twenty visual tests. This is useful for unit-testing small fragments of KCL.

It's easy! All you need to do is:
- Write a KCL file
- Save it under `tests/executor/inputs/no_visuals/foo.kcl`
- Open `no_visuals.rs` and add `gen_test!(foo);`
This commit is contained in:
Adam Chalmers
2024-08-05 21:44:49 -05:00
committed by GitHub
parent ab729dbcdb
commit 5df8a943a9
13 changed files with 188 additions and 12 deletions

View File

@ -4,7 +4,7 @@ use kcl_lib::{settings::types::UnitLength, test_server::execute_and_snapshot};
/// i.e. how different the current model snapshot can be from the previous saved one.
const MIN_DIFF: f64 = 0.99;
// mod server;
mod no_visuals;
macro_rules! kcl_input {
($file:literal) => {