mirror of
https://github.com/Steffo99/micronfig.git
synced 2024-11-23 00:24:18 +00:00
21 lines
365 B
Rust
21 lines
365 B
Rust
|
macro_rules! pass {
|
||
|
($id:ident) => {
|
||
|
#[test]
|
||
|
fn $id() {
|
||
|
trybuild::TestCases::new().pass(format!("tests/sources/{}.rs", stringify!($id)));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
macro_rules! fail {
|
||
|
($id:ident) => {
|
||
|
#[test]
|
||
|
fn $id() {
|
||
|
trybuild::TestCases::new().compile_fail(format!("tests/sources/{}.rs", stringify!($id)));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
pass!(empty);
|
||
|
pass!(string_single_explicit);
|