Skip to content

Commit

Permalink
Move visuals tests into simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchalmers committed Nov 15, 2024
1 parent cbdf7f8 commit 5b3a293
Show file tree
Hide file tree
Showing 164 changed files with 362,268 additions and 1,453 deletions.
10 changes: 1 addition & 9 deletions src/wasm-lib/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@ redo-kcl-stdlib-docs:
EXPECTORATE=overwrite {{cnr}} -p kcl-lib docs::gen_std_tests::test_generate_stdlib

# Create a new KCL deterministic simulation test case.
new-sim-test test_name kcl_program render_to_png="true":
# Each test file gets its own directory. This will contain the KCL program, and its
# snapshotted artifacts (e.g. serialized tokens, serialized ASTs, program memory,
# PNG snapshots, etc).
mkdir kcl/tests/{{test_name}}
echo "{{kcl_program}}" > kcl/tests/{{test_name}}/input.kcl
# Add the various tests for this new test case.
cat kcl/tests/simtest.tmpl | sed "s/TEST_NAME_HERE/{{test_name}}/" | sed "s/RENDER_TO_PNG/{{render_to_png}}/" >> kcl/src/simulation_tests.rs
# Run all the tests for the first time, in the right order.
new-sim-test test_name render_to_png="true":
{{cita}} -p kcl-lib -- tests::{{test_name}}::tokenize
{{cita}} -p kcl-lib -- tests::{{test_name}}::parse
{{cita}} -p kcl-lib -- tests::{{test_name}}::unparse
Expand Down
Loading

0 comments on commit 5b3a293

Please sign in to comment.