From e77cdc025b0e80049344f258d9ca170d0953d0d7 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 15 Jan 2021 21:11:30 -0500 Subject: Implement Biz.Test with tasty Also changes the --test option to a 'test' command. This is because running the tests for a namespace/exe should never be combined with anything else: you either want to run the tests, or not. --- Biz/Test.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Biz/Test.hs (limited to 'Biz/Test.hs') diff --git a/Biz/Test.hs b/Biz/Test.hs new file mode 100644 index 0000000..9af8912 --- /dev/null +++ b/Biz/Test.hs @@ -0,0 +1,24 @@ +{-# LANGUAGE NoImplicitPrelude #-} + +module Biz.Test + ( Tree, + group, + unit, + (@=?), + ) +where + +-- : dep tasty +-- : dep tasty-hunit +import Alpha hiding (group) +import qualified Test.Tasty as Tasty +import Test.Tasty.HUnit ((@=?)) +import qualified Test.Tasty.HUnit as HUnit + +type Tree = Tasty.TestTree + +group :: Tasty.TestName -> [Tasty.TestTree] -> Tasty.TestTree +group = Tasty.testGroup + +unit :: Tasty.TestName -> HUnit.Assertion -> Tasty.TestTree +unit = HUnit.testCase -- cgit v1.2.3