1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Restore the crashers crash test to working.

cc @mdiep
This commit is contained in:
Rob Rix 2016-03-02 12:09:58 -05:00
parent 4dd818e44a
commit 440f741658

View File

@ -23,7 +23,7 @@ import Test.Hspec
spec :: Spec
spec = parallel $ do
-- describe "crashers crash" $ runTestsIn "test/crashers-todo/" ((`shouldThrow` anyException) . return)
describe "crashers crash" $ runTestsIn "test/crashers-todo/" $ \ a b -> a `deepseq` return (a == b) `shouldThrow` anyException
describe "crashers should not crash" $ runTestsIn "test/crashers/" shouldBe
describe "todos are incorrect" $ runTestsIn "test/diffs-todo/" shouldNotBe
describe "should produce the correct diff" $ runTestsIn "test/diffs/" shouldBe
@ -79,7 +79,7 @@ testDiff renderer paths diff matcher = do
let sourceBlobs = Both (S.SourceBlob, S.SourceBlob) <*> sources <*> pure mempty <*> paths
actual <- diffFiles parser renderer sourceBlobs
case diff of
Nothing -> actual `deepseq` matcher actual actual
Nothing -> matcher actual actual
Just file -> do
expected <- readFile file
matcher actual expected