diff options
| author | pml68 <contact@pml68.dev> | 2025-03-03 23:49:25 +0100 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-03-03 23:49:25 +0100 |
| commit | 1c1f8a6bccd680d5c9e540035a7ebff3e84c5001 (patch) | |
| tree | 4d520714f9b4c309c007ca92dfdc906e394a2e6a | |
| parent | fix: build.rs not running on git changes (diff) | |
| download | iced-builder-1c1f8a6bccd680d5c9e540035a7ebff3e84c5001.tar.gz | |
refactor: move some `assert_eq`s
Diffstat (limited to '')
| -rwxr-xr-x[-rw-r--r--] | src/values/rotation.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/values/rotation.rs b/src/values/rotation.rs index 2b609d3..90e3f84 100644..100755 --- 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))) ) } |
