Skip to content

Commit cd72f48

Browse files
committed
Avoid the redundant Test which just wraps a Property
1 parent e2dba71 commit cd72f48

File tree

3 files changed

+441
-452
lines changed

3 files changed

+441
-452
lines changed

Generate.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ main = do
2020
,"import TestUtil"
2121
,"import qualified System.FilePath.Windows as W"
2222
,"import qualified System.FilePath.Posix as P"
23-
,"tests :: [(String, Test)]"
23+
,"tests :: [(String, Property)]"
2424
,"tests ="] ++
2525
[" " ++ c ++ "(" ++ show t1 ++ ", " ++ t2 ++ ")" | (c,(t1,t2)) <- zip ("[":repeat ",") tests] ++
2626
[" ]"]
@@ -71,7 +71,7 @@ fromLexemes = unwords . f
7171
renderTest :: Test -> (String, String)
7272
renderTest Test{..} = (body, code)
7373
where
74-
code = "test $ " ++ if null testVars then body else "\\" ++ unwords vars ++ " -> " ++ body
74+
code = "property $ " ++ if null testVars then body else "\\" ++ unwords vars ++ " -> " ++ body
7575
vars = [if null ctor then v else "(" ++ ctor ++ " " ++ v ++ ")" | (ctor,v) <- testVars]
7676

7777
body = fromLexemes $ map (qualify testPlatform) testBody

0 commit comments

Comments
 (0)