Skeleton for the test suite.
authorPHO <pho@cielonegro.org>
Wed, 28 Sep 2011 15:28:28 +0000 (00:28 +0900)
committerPHO <pho@cielonegro.org>
Wed, 28 Sep 2011 15:28:28 +0000 (00:28 +0900)
Ditz-issue: c8c594f249504e28212f18a8a5c6b8a708b99f79

GNUmakefile
Test/Time/HTTP.hs [new file with mode: 0644]
time-http.cabal

index c16dac39af906f307f85db95dafed3b7c7391a09..6473d6fc419f0a1442242a2c13e9700aedfe54ae 100644 (file)
@@ -1,4 +1,3 @@
-#CONFIGURE_ARGS = -O -fbuild-test-suite
-CONFIGURE_ARGS = -O0
+CONFIGURE_ARGS = -O2 --enable-tests
 
 include cabal-package.mk
diff --git a/Test/Time/HTTP.hs b/Test/Time/HTTP.hs
new file mode 100644 (file)
index 0000000..97c5da8
--- /dev/null
@@ -0,0 +1,22 @@
+{-# LANGUAGE
+    UnicodeSyntax
+  #-}
+module Main (main) where
+import System.Exit
+import Test.QuickCheck
+
+main ∷ IO ()
+main = mapM_ runTest tests
+
+runTest ∷ Property → IO ()
+runTest prop
+    = do r ← quickCheckResult prop
+         case r of
+           Success {}           → return ()
+           GaveUp  {}           → exitFailure
+           Failure {}           → exitFailure
+           NoExpectedFailure {} → exitFailure
+
+tests ∷ [Property]
+tests = [
+        ]
index 5f0ddcdc9d4576c47be2ce5bb59fe9110a681995..75b99042247c408784bb383f33219fd3ae8a4e08 100644 (file)
@@ -54,3 +54,19 @@ Library
 
     GHC-Options:
         -Wall
+
+Test-Suite test-time-http
+    Type:    exitcode-stdio-1.0
+    Main-Is: Test/Time/HTTP.hs
+    Default-Language: Haskell2010
+    Build-depends:
+        QuickCheck           == 2.4.*,
+        ascii                == 0.0.*,
+        blaze-builder        == 0.3.*,
+        blaze-textual        == 0.2.*,
+        attoparsec           == 0.9.*,
+        base                 == 4.*,
+        base-unicode-symbols == 0.2.*,
+        time                 == 1.2.*
+    GHC-Options:
+        -Wall -fno-warn-orphans