Skip to content

Commit 30fa23f

Browse files
committed
more test_snip improvements
1 parent f2bd61d commit 30fa23f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/workspaces/test_snip.def

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ tests = concat [
8686
}
8787

8888
main
89-
= (map (const '.') pass) ++
90-
"\n" ++
91-
(join_sep "\n" (map print_fail fail))
89+
= (map (const '.') pass) ++ "\n" ++
90+
if fail == [] then
91+
"all tests pass"
92+
else
93+
error (concat (map print_fail fail))
9294
{
9395
split fn l
9496
= foldr split_item [[], []] l
@@ -107,5 +109,5 @@ main
107109
}
108110

109111
[pass, fail] = split (extract 0) tests;
110-
print_fail x = "FAIL: " ++ x?1;
112+
print_fail x = "\n" ++ "FAIL: " ++ x?1;
111113
}

0 commit comments

Comments
 (0)