From e89ea96739a6ca77d0f374985624930e650aeaec Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 26 Apr 2017 11:45:58 -0400 Subject: [PATCH] Test the specific error message we get for cascading children failures. --- test/Data/Syntax/Assignment/Spec.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/Data/Syntax/Assignment/Spec.hs b/test/Data/Syntax/Assignment/Spec.hs index 561c96e4e..698552e6f 100644 --- a/test/Data/Syntax/Assignment/Spec.hs +++ b/test/Data/Syntax/Assignment/Spec.hs @@ -51,8 +51,7 @@ spec = do () <$ runAssignment (children red) (startingState "a" [Rose (rec Blue 0 1) [Rose (rec Red 0 1) []]]) `shouldBe` Result () it "does not match if its subrule does not match" $ - let errors r = case r of { Result _ -> Nothing ; Error e -> Just e } in - fmap Prologue.length (errors (runAssignment (children red) (startingState "a" [Rose (rec Blue 0 1) [Rose (rec Green 0 1) []]]))) `shouldBe` Just 1 + (runAssignment (children red) (startingState "a" [Rose (rec Blue 0 1) [Rose (rec Green 0 1) []]])) `shouldBe` Error [ "Expected Red but got Green" ] it "matches nested children" $ do runAssignment