From 321859ab1fe4a6b1f3cc7084b8836474ff872e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 29 Sep 2024 14:26:21 +0200 Subject: User-defined test functions without parameters --- src/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 61afbd8..42b2e5b 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -149,11 +149,11 @@ main = do out <- startOutput (optVerbose opts) useColor tests <- forM files $ \(path, mbTestName) -> do - Module { .. } <- parseTestFile path - return $ case mbTestName of + Module {..} <- parseTestFile path + return $ map ( , moduleDefinitions ) $ case mbTestName of Nothing -> moduleTests Just name -> filter ((==name) . testName) moduleTests - ok <- allM (runTest out $ optTest opts) $ + ok <- allM (uncurry $ runTest out $ optTest opts) $ concat $ replicate (optRepeat opts) $ concat tests when (not ok) exitFailure -- cgit v1.2.3