Files
diodeinc__pcb/crates/pcb-star-core/tests/assert.rs
Lenny Khazan e852477546 Initial release (#5)
* Initial release

* cargo-dist

* build and test CI

* update ubuntu workflow

* fmt

* ubuntu: install deps

* clippy: 0.1.88 fixes

* format

* install clippy

* Update README.md

* Don't run cargo-dist on PRs
2025-07-01 04:06:08 -04:00

26 lines
688 B
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.
#[macro_use]
mod common;
// Error case – evaluating `error()` should propagate the message.
snapshot_eval!(error_function_should_error, {
"test.star" => r#"
error("boom")
"#
});
// `check()` with a true condition should pass and produce a schematic/netlist.
snapshot_eval!(check_true_should_pass, {
"test.star" => 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.star" => r#"
# check should raise when condition is false
check(False, "failing condition")
"#
});