Skip to content

Commit a915bcb

Browse files
committed
ES: added some stuff to Test
1 parent 65e05f3 commit a915bcb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

grin/src/Test/ExtendedSyntax/Assertions.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ instance SameAs ETResult where
3838
-- instance SameAs ProducerGraph where
3939
-- sameAs found expected = (PP found) `shouldBe` (PP expected)
4040

41-
-- instance SameAs ExpChanges where
42-
-- sameAs found expected = found `shouldBe` expected
41+
instance SameAs ExpChanges where
42+
sameAs found expected = found `shouldBe` expected
4343

4444
instance (SameAs a, SameAs b) => SameAs (a, b) where
4545
sameAs (f1, f2) (e1, e2) = do

grin/src/Test/ExtendedSyntax/New/Test.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ type TestExpContext = (String, (TypeEnv, Exp) -> (TypeEnv, Exp))
2222
testExprContext :: (((TypeEnv, Exp) -> (TypeEnv, Exp)) -> Spec) -> Spec
2323
testExprContext mkSpec = forM_ contexts $ \(label, ctx) -> describe (concat ["(", label, ")"]) $ mkSpec ctx
2424

25+
testExprContextIn :: [TestExpContext] -> (((TypeEnv, Exp) -> (TypeEnv, Exp)) -> Spec) -> Spec
26+
testExprContextIn ctxs mkSpec = forM_ ctxs $ \(label, ctx) -> describe (concat ["(", label, ")"]) $ mkSpec ctx
27+
2528
testExprContextE :: ((Exp -> Exp) -> Spec) -> Spec
2629
testExprContextE mkSpec =
2730
forM_ contexts $ \(label, ctx) ->

0 commit comments

Comments
 (0)