@@ -54,12 +54,14 @@ import           Numeric (showFFloat)
5454import            System.Posix.Internals  (c_unlink )
5555
5656import            Test.Tasty  (TestTree , TestName , testGroup )
57+ import            Test.Tasty.ExpectedFailure  (expectFailBecause )
5758import            Test.Tasty.HUnit  (testCase , (@?=) , Assertion )
5859import            Test.Tasty.QuickCheck 
5960                   ( Arbitrary (.. ), oneof , choose , listOf , elements , forAll 
6061                   , counterexample , ioProperty , Property , testProperty 
6162                   , (===) , (.&&.) , conjoin 
6263                   , UnicodeString (.. ), NonNegative (.. )
64+                    , NonZero (.. )
6365                   )
6466import            QuickCheckUtils 
6567
@@ -800,8 +802,11 @@ testsFloating = testGroup "RealFloat"
800802          singleMatches (formatDouble (standard 3 )) (flip  (showFFloat (Just  3 )) [] ) ( 0.0056   , " 0.006"      )
801803          singleMatches (formatDouble (standard 3 )) (flip  (showFFloat (Just  3 )) [] ) ( 0.0096   , " 0.010"      )
802804          singleMatches (formatDouble (standard 5 )) (flip  (showFFloat (Just  5 )) [] ) ( 12.345   , " 12.34500"   )
805+       , expectFailBecause " incorrect implementation for the zero case"   $ 
806+         testCase " specific zero"   $ 
803807          singleMatches (formatDouble (standard 3 )) (flip  (showFFloat (Just  3 )) [] ) ( 0.0      , " 0.000"      )
804-       , testProperty " standard N"   \ (NonNegative  p, d ::  Double  ) ->  (LC. unpack .  toLazyByteString)
808+       --  NonZero should be removed when zero case fixed
809+       , testProperty " standard N"   \ (NonNegative  p, NonZero  (d ::  Double  )) ->  (LC. unpack .  toLazyByteString)
805810        (formatDouble (standard p) d) ===  showFFloat (Just  p) d " " 
806811      ]
807812    , testMatches " d2sLooksLikePowerOf5"   doubleDec show 
0 commit comments