mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Add a test for special case macros like format! and assert!
This commit is contained in:
parent
07106d444c
commit
72cac8beae
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user