summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-08 00:03:28 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-08 00:03:28 -0400
commit37a34b3dbcfb38f815edc141a57721d9f94440b4 (patch)
treef903abdebe58e7bfbcff1c88d5f11c2cb854cc50
parent0ade54179ba2db79f72e723eceedfcd6a1757b6f (diff)
refactor
-rw-r--r--Test.hs27
1 files changed, 14 insertions, 13 deletions
diff --git a/Test.hs b/Test.hs
index f6ac81c53..2bcc5fcf4 100644
--- a/Test.hs
+++ b/Test.hs
@@ -83,19 +83,6 @@ import qualified Utility.Gpg
main :: [String] -> IO ()
main ps = do
- let tests = testGroup "Tests"
- -- Test both direct and indirect mode.
- -- Windows is only going to use direct mode,
- -- so don't test twice.
- [ properties
-#ifndef mingw32_HOST_OS
- , withTestEnv True $ unitTests "(direct)"
- , withTestEnv False $ unitTests "(indirect)"
-#else
- , withTestEnv False $ unitTests ""
-#endif
- ]
-
-- Can't use tasty's defaultMain because one of the command line
-- parameters is "test".
let pinfo = info (helper <*> suiteOptionParser ingredients tests)
@@ -124,6 +111,20 @@ ingredients =
, rerunningTests [consoleTestReporter]
]
+tests :: TestTree
+tests = testGroup "Tests"
+ -- Test both direct and indirect mode.
+ -- Windows is only going to use direct mode, so don't test twice.
+ [ properties
+#ifndef mingw32_HOST_OS
+ , withTestEnv True $ unitTests "(direct)"
+ , withTestEnv False $ unitTests "(indirect)"
+#else
+ , withTestEnv False $ unitTests ""
+#endif
+ ]
+
+
properties :: TestTree
properties = localOption (QuickCheckTests 1000) $ testGroup "QuickCheck"
[ testProperty "prop_idempotent_deencode_git" Git.Filename.prop_idempotent_deencode