From 1c1f8a6bccd680d5c9e540035a7ebff3e84c5001 Mon Sep 17 00:00:00 2001 From: pml68 Date: Mon, 3 Mar 2025 23:49:25 +0100 Subject: refactor: move some `assert_eq`s --- src/values/rotation.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) mode change 100644 => 100755 src/values/rotation.rs (limited to 'src/values') diff --git a/src/values/rotation.rs b/src/values/rotation.rs old mode 100644 new mode 100755 index 2b609d3..90e3f84 --- a/src/values/rotation.rs +++ b/src/values/rotation.rs @@ -66,8 +66,13 @@ mod tests { #[test] fn can_parse_with_s_prefix() { assert_eq!( - Rotation::from_str("s12.3"), + Rotation::from_str(" s12.3"), Ok(Rotation::Solid(Radians(12.3))) + ); + + assert_eq!( + Rotation::from_str("S9.4"), + Ok(Rotation::Solid(Radians(9.4))) ) } @@ -76,14 +81,11 @@ mod tests { assert_eq!( Rotation::from_str("f16.9"), Ok(Rotation::Floating(Radians(16.9))) - ) - } + ); - #[test] - fn can_parse_with_uppercase_prefix() { assert_eq!( - Rotation::from_str("S9.4"), - Ok(Rotation::Solid(Radians(9.4))) + Rotation::from_str("F21.45 "), + Ok(Rotation::Floating(Radians(21.45))) ) } -- cgit v1.2.3