Skip to content

Commit 5ac1cd9

Browse files
m-ou-setgross35
authored andcommitted
Test Debug for Location.
1 parent c85760c commit 5ac1cd9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

library/coretests/tests/panic/location.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,11 @@ fn location_const_column() {
2929
const COLUMN: u32 = CALLER.column();
3030
assert_eq!(COLUMN, 40);
3131
}
32+
33+
#[test]
34+
fn location_debug() {
35+
let f = format!("{:?}", Location::caller());
36+
assert!(f.contains(&format!("{:?}", file!())));
37+
assert!(f.contains("35"));
38+
assert!(f.contains("29"));
39+
}

0 commit comments

Comments
 (0)