mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
Test Debug for Location.
This commit is contained in:
@@ -29,3 +29,11 @@ fn location_const_column() {
|
||||
const COLUMN: u32 = CALLER.column();
|
||||
assert_eq!(COLUMN, 40);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn location_debug() {
|
||||
let f = format!("{:?}", Location::caller());
|
||||
assert!(f.contains(&format!("{:?}", file!())));
|
||||
assert!(f.contains("35"));
|
||||
assert!(f.contains("29"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user