From 1029ed1724795d960c3117be35380d3a9c92c6ed Mon Sep 17 00:00:00 2001 From: PHO Date: Thu, 29 Sep 2011 00:28:28 +0900 Subject: [PATCH] Skeleton for the test suite. Ditz-issue: c8c594f249504e28212f18a8a5c6b8a708b99f79 --- GNUmakefile | 3 +-- Test/Time/HTTP.hs | 22 ++++++++++++++++++++++ time-http.cabal | 16 ++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 Test/Time/HTTP.hs diff --git a/GNUmakefile b/GNUmakefile index c16dac3..6473d6f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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 index 0000000..97c5da8 --- /dev/null +++ b/Test/Time/HTTP.hs @@ -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 = [ + ] diff --git a/time-http.cabal b/time-http.cabal index 5f0ddcd..75b9904 100644 --- a/time-http.cabal +++ b/time-http.cabal @@ -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 -- 2.40.0