feat: Add testing and benchmarking capabilities

This commit introduces a new `tester` module to the `ast` crate,
enabling functional tests and performance benchmarks for MYC scripts.

Functional tests are executed by reading `.myc` files from the
`examples` directory, parsing expected output comments, and comparing
them against the actual script execution results.

Benchmarking involves measuring the execution time of scripts,
calculating median durations, and comparing them against stored
baselines. The commit also adds support for updating these baselines.

The `ast.rs` CLI and the `main.rs` GUI application have been updated to
expose these new testing and benchmarking features. The `Cargo.toml` and
`Cargo.lock` files have been updated to include the `regex` dependency
required for parsing benchmark comments.
This commit is contained in:
Michael Schimmel
2026-02-17 14:47:04 +01:00
parent b1ca16149d
commit b0f139f389
12 changed files with 283 additions and 30 deletions
+1
View File
@@ -9,3 +9,4 @@ eframe = "0.33.3"
lazy_static = "1.4.0"
clap = { version = "4.5", features = ["derive"] }
chrono = "0.4"
regex = "1.10"