diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2025-06-11 18:28:17 +0200 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-06-16 03:14:44 +0000 |
| commit | 5ac1cd9c7da72eed5bce611755ca185a88aef84f (patch) | |
| tree | 556caa212ae61c9b111ee62697d580f1bd8b77d2 | |
| parent | c85760c66ad94d0c1d50c5b8c537e26e896e6816 (diff) | |
| download | rust-5ac1cd9c7da72eed5bce611755ca185a88aef84f.tar.gz rust-5ac1cd9c7da72eed5bce611755ca185a88aef84f.zip | |
Test Debug for Location.
| -rw-r--r-- | library/coretests/tests/panic/location.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/coretests/tests/panic/location.rs b/library/coretests/tests/panic/location.rs index d20241d8380..5ce0b06e90e 100644 --- a/library/coretests/tests/panic/location.rs +++ b/library/coretests/tests/panic/location.rs @@ -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")); +} |
