Add a test for special case macros like format! and assert!

This commit is contained in:
topecongiro 2017-12-01 13:28:16 +09:00 committed by Seiichi Uchida
parent 07106d444c
commit 72cac8beae
2 changed files with 23 additions and 0 deletions

View File

@ -216,3 +216,11 @@ make_test!(str_searcher_ascii_haystack, "bb", "abbcbbd", [
Reject(6, 7),
]);
}
fn special_case_macros() {
// format!
let s = format!("Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')", result, input, expected);
// assert!
assert!(result, "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')", result, input, expected);
}

View File

@ -270,3 +270,18 @@ fn issue2214() {
]
);
}
fn special_case_macros() {
// format!
let s = format!(
"Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')",
result, input, expected
);
// assert!
assert!(
result,
"Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')",
result, input, expected
);
}