Commits

dafis committed 59aca4a

Tests for full precision showing

  • Participants
  • Parent commits 0d48b11

Comments (0)

Files changed (1)

File tests/quickcheck/qcTests.hs

 propDouble :: Property
 propDouble = forAll arbitrary (\d -> d == rdDouble d)
 
+propFullDouble :: Property
+propFullDouble = forAll arbitrary (\d -> d == read (show $ FD d))
+
 propFloat :: Property
 propFloat = forAll arbitrary (\f -> f == rdFloat f)
 
+propFullFloat :: Property
+propFullFloat = forAll arbitrary (\d -> d == read (show $ FF d))
+
 verify :: Args -> (String, Property) -> IO ()
 verify args (what, prop) = do
     putStrLn what
     args <- fmap confArgs getArgs
     mapM_ (verify args)
         [ ("Float",propFloat)
+        , ("FullFloat",propFullFloat)
         , ("Double",propDouble)
+        , ("FullDouble",propFullDouble)
         , ("Raw",propRaw)
         , ("Bin",propBin)
         , ("Dec",propDec)