on master help sign in
test tweaking
f60f383techtangents
elm/tests/Main.hs+4−1
@@ -17,6 +17,8 @@ main = defaultMain tests
17parses :: String -> Bool
17parses :: String -> Bool
18parses code = either (const False) (const True) (parseProgram code)
18parses code = either (const False) (const True) (parseProgram code)
19
19
20+parseFails = not . parses
21+
20tests :: [TF.Test]
22tests :: [TF.Test]
21tests = [
23tests = [
22 testGroup "String Assignments" [
24 testGroup "String Assignments" [
@@ -31,4 +33,5 @@ prop_assignString i s =
31
33
32prop_invalidIdent :: ValidIdent -> InvalidIdentChar -> StringValue -> Bool
34prop_invalidIdent :: ValidIdent -> InvalidIdentChar -> StringValue -> Bool
33prop_invalidIdent i z s =
35prop_invalidIdent i z s =
34− (not . parses) [qq|{i}{z} = "{s}"|]
36+ parseFails [qq|{i}{z} = "{s}"|]
37+