Files
Akhil Velagapudi 766ec63788 Speed up the Cargo test suite (#1043)
* Speed up the Cargo test suite

Amp-Thread-ID: https://ampcode.com/threads/T-019fe519-96e9-701f-8ca3-afd369c516ba

* Prioritize slow nextest tests

Amp-Thread-ID: https://ampcode.com/threads/T-019fe519-96e9-701f-8ca3-afd369c516ba

* Simplify nextest configuration

Amp-Thread-ID: https://ampcode.com/threads/T-019fe519-96e9-701f-8ca3-afd369c516ba
2026-08-09 17:17:31 -04:00

46 lines
1.2 KiB
Rust
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Error case – evaluating `error()` should propagate the message.
snapshot_eval!(error_function_should_error, {
"test.zen" => r#"
error("boom")
"#
});
// `check()` with a true condition should pass and produce a schematic/netlist.
snapshot_eval!(check_true_should_pass, {
"test.zen" => r#"
# check should not raise when condition is true
check(True, "all good")
"#
});
// `check()` with a false condition should raise and surface the message.
snapshot_eval!(check_false_should_error, {
"test.zen" => r#"
# check should raise when condition is false
check(False, "failing condition")
"#
});
// `warn()` should emit a warning and continue execution.
snapshot_eval!(warn_function_should_warn, {
"test.zen" => r#"
warn("this is a warning")
"#
});
// `warn()` with multiple calls should emit multiple warnings and continue execution.
snapshot_eval!(warn_function_multiple_warnings, {
"test.zen" => r#"
warn("first warning")
warn("second warning")
"#
});
// `warn()` should not stop execution - code after warn() should still run.
snapshot_eval!(warn_function_continues_execution, {
"test.zen" => r#"
warn("warning message")
x = 42
"#
});