2024-01-03 01:52:18 +00:00
|
|
|
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);
|
2024-01-03 01:55:29 +00:00
|
|
|
pass!(string_single_implicit);
|
|
|
|
pass!(string_multi_explicit);
|
2024-01-03 01:56:28 +00:00
|
|
|
pass!(string_multi_implicit);
|
|
|
|
pass!(string_multi_mixed);
|
2024-01-03 02:00:50 +00:00
|
|
|
pass!(parse_single_u64);
|
|
|
|
pass!(parse_single_i64);
|
|
|
|
pass!(parse_single_ipaddr);
|
|
|
|
pass!(parse_single_pathbuf_full);
|
|
|
|
pass!(parse_single_pathbuf_use);
|