From 74c773b7014bdb8f44d7726fff692003dd875954 Mon Sep 17 00:00:00 2001 From: Younies Mahmoud Date: Fri, 12 Jul 2024 11:34:00 +0200 Subject: [PATCH] Improve units format tests (#5234) --- components/experimental/src/dimension/units/format.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/experimental/src/dimension/units/format.rs b/components/experimental/src/dimension/units/format.rs index c6b35409a25..a2e122bae77 100644 --- a/components/experimental/src/dimension/units/format.rs +++ b/components/experimental/src/dimension/units/format.rs @@ -65,14 +65,14 @@ fn test_basic() { let test_cases = [ ( - locale!("en-US").into(), + locale!("en-US"), "meter", "12345.67", UnitsFormatterOptions::default(), "12,345.67 m", ), ( - locale!("en-US").into(), + locale!("en-US"), "century", "12345.67", UnitsFormatterOptions { @@ -82,14 +82,14 @@ fn test_basic() { "12,345.67 centuries", ), ( - locale!("de-DE").into(), + locale!("de-DE"), "meter", "12345.67", UnitsFormatterOptions::default(), "12.345,67 m", ), ( - locale!("ar-EG").into(), + locale!("ar-EG"), "meter", "12345.67", UnitsFormatterOptions { @@ -101,7 +101,7 @@ fn test_basic() { ]; for (locale, unit, value, options, expected) in test_cases { - let fmt = UnitsFormatter::try_new(&locale, unit, options).unwrap(); + let fmt = UnitsFormatter::try_new(&locale.into(), unit, options).unwrap(); let value = value.parse().unwrap(); assert_writeable_eq!(fmt.format_fixed_decimal(&value, unit), expected); }