Skip to content

Commit

Permalink
removed block arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
BebeSparkelSparkel committed Jun 27, 2024
1 parent b4e5c6c commit fef5f6a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/builder/Data/ByteString/Builder/Tests.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

Expand Down Expand Up @@ -789,7 +788,7 @@ testsFloating = testGroup "RealFloat"
, ( 4.294967295 , "4.294967295e0" )
]
, testGroup "d2sStandard"
[ testCase "specific" do
[ testCase "specific" $ do
singleMatches (formatDouble (standard 2)) (flip (showFFloat (Just 2)) []) ( 12.3 , "12.30" )
singleMatches (formatDouble (standard 2)) (flip (showFFloat (Just 2)) []) ( 12.345 , "12.34" )
singleMatches (formatDouble (standard 2)) (flip (showFFloat (Just 2)) []) ( 12.3451 , "12.35" )
Expand All @@ -805,7 +804,7 @@ testsFloating = testGroup "RealFloat"
testCase "specific zero" $
singleMatches (formatDouble (standard 3)) (flip (showFFloat (Just 3)) []) ( 0.0 , "0.000" )
-- NonZero should be removed when zero case fixed
, testProperty "standard N" \(NonNegative p, NonZero (d :: Double)) -> (LC.unpack . toLazyByteString)
, testProperty "standard N" $ \(NonNegative p, NonZero (d :: Double)) -> (LC.unpack . toLazyByteString)
(formatDouble (standard p) d) === showFFloat (Just p) d ""
]
, testMatches "d2sLooksLikePowerOf5" doubleDec show
Expand Down Expand Up @@ -983,7 +982,7 @@ testsFloating = testGroup "RealFloat"
]
where
testExpected :: TestName -> (a -> Builder) -> [(a, String)] -> TestTree
testExpected name dec = testCase name . traverse_ \(x, ref) -> LC.unpack (toLazyByteString (dec x)) @?= ref
testExpected name dec = testCase name . traverse_ (\(x, ref) -> LC.unpack (toLazyByteString (dec x)) @?= ref)

singleMatches :: (a -> Builder) -> (a -> String) -> (a, String) -> Assertion
singleMatches dec refdec (x, ref) = do
Expand Down

0 comments on commit fef5f6a

Please sign in to comment.