{- How to use: * All tests: runghc testFixMe.hs * Individual test e.g. 2nd: runghc testFixMe.hs 1 -} import System.Environment (getArgs) import System.Exit (exitFailure) import TestLib import Text.Read (readMaybe) import FixMe (pow) tests = [ "0^0" ~: pow 0 0 ~?= 1 , "7^0" ~: pow 7 0 ~?= 1 , "(-3)^5" ~: pow (-3) 5 ~?= -243 -- The following tests that you don't change something you shouldn't. , "2^70" ~: fromIntegral (pow 2 70) ~?= 1180591620717411303424 -- more tests during marking ] main = testlibMain tests