]> git.lizzy.rs Git - rust.git/blobdiff - library/core/tests/panic/location.rs
Rollup merge of #103315 - RalfJung:interpret-switchint-ice, r=bjorn3
[rust.git] / library / core / tests / panic / location.rs
index ba066bfbc5398f91825658458051d8fbbabf0d31..d20241d8380013800a07fbeddc49bfac01e8e65e 100644 (file)
@@ -5,27 +5,27 @@
 
 #[test]
 fn location_const_caller() {
-   const _CALLER_REFERENCE: &Location<'static> = Location::caller();
-   const _CALLER: Location<'static> = *Location::caller();
+    const _CALLER_REFERENCE: &Location<'static> = Location::caller();
+    const _CALLER: Location<'static> = *Location::caller();
 }
 
 #[test]
 fn location_const_file() {
-   const CALLER: &Location<'static> = Location::caller();
-   const FILE: &str = CALLER.file();
-   assert_eq!(FILE, "library/core/tests/panic/location.rs");
+    const CALLER: &Location<'static> = Location::caller();
+    const FILE: &str = CALLER.file();
+    assert_eq!(FILE, file!());
 }
 
 #[test]
 fn location_const_line() {
-   const CALLER: &Location<'static> = Location::caller();
-   const LINE: u32 = CALLER.line();
-   assert_eq!(LINE, 21);
+    const CALLER: &Location<'static> = Location::caller();
+    const LINE: u32 = CALLER.line();
+    assert_eq!(LINE, 21);
 }
 
 #[test]
 fn location_const_column() {
-   const CALLER: &Location<'static> = Location::caller();
-   const COLUMN: u32 = CALLER.column();
-   assert_eq!(COLUMN, 39);
-}
\ No newline at end of file
+    const CALLER: &Location<'static> = Location::caller();
+    const COLUMN: u32 = CALLER.column();
+    assert_eq!(COLUMN, 40);
+}