Skip to content
Snippets Groups Projects
Commit 06b4408f authored by chrg's avatar chrg
Browse files

Use glitterOnWith instead

parent cf9284c8
No related branches found
No related tags found
No related merge requests found
......@@ -43,11 +43,10 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1708355228,
"narHash": "sha256-UqWqoxTr5cbTSdIPUtVp22xhBMaBy3VbbFrp1SMr424=",
"ref": "refs/heads/main",
"rev": "80fd7821b0e55ec6706d638a6303c9ead2cd1059",
"revCount": 1,
"dirtyRev": "e40b8ead4d46261fccf1530507b191d9a1ef831b-dirty",
"dirtyShortRev": "e40b8ea-dirty",
"lastModified": 1708355706,
"narHash": "sha256-a7sHHhQPvDaEjmCAgiAN9OQRJMQNkFVNHzjIu0BYfAg=",
"type": "git",
"url": "file:///Users/chrg/Develop/repos/hspec-glitter"
},
......
......@@ -42,10 +42,16 @@ spec = describe "examples" do
rex <- runIO $ RTree.reduce predicate re
it "should find an opr" do
(mex, result) <- runWriterT (IRTree.reduce (debugPredicate showString (prettyExprS 0) predicate) me)
rex `shouldBe` mex
pure $ glitter ("test/expected/" <> str <> "-red") (appEndo result "")
onGlitterWith
("test/expected/" <> str <> "-red")
( \fp () -> do
(mex, result) <- runWriterT (IRTree.reduce (debugPredicate showString (prettyExprS 0) predicate) me)
writeFile fp (appEndo result "")
pure mex
)
do
it "should produce the same results as the RTree" \mex -> do
rex `shouldBe` mex
it "should find an opr exponentially" do
(mex, result) <- runWriterT (IRTree.reduceExp (debugPredicate showString (prettyExprS 0) predicate) me)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment