1. Bryan O'Sullivan
  2. double-conversion

Commits

Bryan O'Sullivan  committed 032e258

Add simple QuickCheck tests

  • Participants
  • Parent commits 65f52bd
  • Branches default

Comments (0)

Files changed (3)

File .hgignore

View file
-^(?:cabal-dev|dist)$
+^(?:cabal-dev|dist|tests/dist)$
 ^demo/demo$
 \.(?:aux|eventlog|h[ip]|log|[oa]|orig|prof|ps|rej|swp)$
 ~$

File tests/Properties.hs

View file
+import Data.Double.Conversion
+import Test.QuickCheck
+import Test.Framework (defaultMain, testGroup)
+import Test.Framework.Providers.QuickCheck2 (testProperty)
+import qualified Data.Text as T
+
+shortest a = (read . T.unpack . toShortest) a == a
+
+main = defaultMain [
+        testProperty "shortest" shortest
+       ]

File tests/double-conversion-tests.cabal

View file
+name:           double-conversion-tests
+version:        0
+cabal-version:  >= 1.8
+build-type:     Simple
+
+executable qc
+  main-is: Properties.hs
+
+  build-depends:
+    QuickCheck,
+    base,
+    double-conversion,
+    test-framework,
+    test-framework-quickcheck2,
+    text >= 0.11.0.8