Skip to content
Snippets Groups Projects
Unverified Commit 2202950f authored by Erik Fong's avatar Erik Fong
Browse files

Debug formatting test

parent 7ccb3c8d
Branches master
No related tags found
No related merge requests found
Pipeline #6134 failed
#![no_std] #![cfg_attr(not(test), no_std)]
pub mod buffer; pub mod buffer;
pub mod error; pub mod error;
......
...@@ -157,4 +157,11 @@ mod tests { ...@@ -157,4 +157,11 @@ mod tests {
let gps = Gps::new(0.0, 0.0, f16::from_f32(0.0), 0, 540.0, f16::from_f32(0.0)); let gps = Gps::new(0.0, 0.0, f16::from_f32(0.0), 0, 540.0, f16::from_f32(0.0));
assert_eq!(gps.heading, 128); assert_eq!(gps.heading, 128);
} }
#[test]
fn debug_printing() {
let gps = Gps::new(0.0, 0.0, f16::from_f32(0.0), 0, 359.0, f16::from_f32(0.0));
let x = format!("{gps:?}");
assert_eq!(x,"Gps { latitude: 0°, longitude: 0°, altitude: 0 m, max_error: 0 m, heading: 358.59375°, speed: 0 m/s }")
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment