Skip to content

Commit

Permalink
tests: initial setup to unit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
BRonen committed Feb 11, 2024
1 parent f197f93 commit 5a59965
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/Spec.hs
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
module Main (main) where

import Test.Tasty
import Test.Tasty.HUnit

main :: IO ()
main = putStrLn "Test suite not yet implemented"
main = do
defaultMain $ testGroup "Root" [test1, test2]

test1 :: TestTree
test1 = testCase "2+2=4" $ (2 + 2 :: Integer) @?= (4 :: Integer)

test2 :: TestTree
test2 = testCase "7 is even" $ assertBool "Oops, 7 is odd" (odd (7 :: Integer))

0 comments on commit 5a59965

Please sign in to comment.