49ad76e7c3
This commit refactors the test suite by removing the monolithic `integration_test.rs` file. The tests have been categorized and moved into dedicated modules within the `tests/` directory: - `tests/parser.rs`: Contains tests for parsing various literal values. - `tests/destructuring.rs`: Houses tests related to destructuring syntax. - `tests/closures.rs`: Includes tests for closure behavior and related optimizations. - `tests/optimizer.rs`: Contains tests specifically targeting optimizer logic and regressions. - `tests/records.rs`: Holds tests for record syntax and associated optimizations. - `tests/rtl.rs`: Contains tests for runtime library operators and functions. - `tests/pipeline.rs`: Tests for pipeline functionality. - `tests/macros.rs`: Tests for macro expansion and related issues. - `tests/error_recovery.rs`: Includes tests for compiler error handling and recovery mechanisms. - `tests/examples.rs`: Verifies the execution of example scripts. This reorganization improves test discoverability and maintainability. The `lib.rs` file has also been updated to reflect these changes by removing the reference to the old `integration_test` module. The `type_checker.rs` file has had some tests removed, as they are now covered by the more specific tests in `tests/error_recovery.rs`.
16 lines
398 B
Rust
16 lines
398 B
Rust
use myc::utils::tester::run_functional_tests_with_optimization;
|
|
|
|
#[test]
|
|
fn test_examples() {
|
|
for opt in [false, true] {
|
|
let results = run_functional_tests_with_optimization(opt);
|
|
for res in results {
|
|
assert!(
|
|
res.success,
|
|
"Example {} failed at opt {}: {}",
|
|
res.name, opt, res.message
|
|
);
|
|
}
|
|
}
|
|
}
|