Show input for ambiguous parse failures

Summary: show the input that an ambiguous parse is failing at

Reviewed By: patapizza

Differential Revision: D7502191

fbshipit-source-id: 9f0fbf8301413d9007236ba5b6af1f4b41c20269
This commit is contained in:
Aaron Yue 2018-04-04 10:24:53 -07:00 committed by Facebook Github Bot
parent 3629fbd503
commit 878bcb9277

View File

@ -77,7 +77,7 @@ makeCorpusTest targets (context, options, xs) = testCase "Corpus Tests" $
[token] -> assertBool ("don't pass predicate on " ++ show input) $ [token] -> assertBool ("don't pass predicate on " ++ show input) $
predicate context token predicate context token
_ -> assertFailure $ show (length fullRangeTokens) _ -> assertFailure $ show (length fullRangeTokens)
++ " different ambiguous parses" ++ " different ambiguous parses on " ++ show input
makeNegativeCorpusTest :: [Some Dimension] -> NegativeCorpus -> TestTree makeNegativeCorpusTest :: [Some Dimension] -> NegativeCorpus -> TestTree