From ad8d38c64cc98e71059538ca10bd4b979cd2cf74 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 29 Jun 2021 20:35:43 -0400 Subject: fix(xanthous): Fix display of square/cubic units MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously this'd display `5 m m³`, because it'd show the underlying value then add the unit suffix on at the end Change-Id: Idd240ddfebc212460f9fb529eff72732a5dafe2a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3241 Reviewed-by: grfn Tested-by: BuildkiteCI --- users/grfn/xanthous/test/Xanthous/DataSpec.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'users/grfn/xanthous/test/Xanthous') diff --git a/users/grfn/xanthous/test/Xanthous/DataSpec.hs b/users/grfn/xanthous/test/Xanthous/DataSpec.hs index 1aa250b1a4..9e67505ba9 100644 --- a/users/grfn/xanthous/test/Xanthous/DataSpec.hs +++ b/users/grfn/xanthous/test/Xanthous/DataSpec.hs @@ -99,8 +99,11 @@ test = testGroup "Xanthous.Data" , testGroup "units" [ testGroup "unit suffixes" [ testCase "density" - $ tshow (10000 :: Grams `Per` Cubic Meters) - @?= "10000.0 g/m³" + $ tshow (10000 :: Grams `Per` Cubic Meters) @?= "10000.0 g/m³" + , testCase "volume" + $ tshow (5 :: Cubic Meters) @?= "5.0 m³" + , testCase "area" + $ tshow (5 :: Square Meters) @?= "5.0 m²" ] ] ] -- cgit 1.4.1