inspection-testing 0.4.2 → 0.4.2.1
raw patch · 4 files changed
+34/−1 lines, 4 files
Files
- ChangeLog.md +4/−0
- examples/Regression.hs +17/−0
- inspection-testing.cabal +11/−1
- src/Test/Inspection/Core.hs +2/−0
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for inspection-testing +## 0.4.2.1 -- 2019-06-07++* Bugfix release+ ## 0.4.2 -- 2019-06-05 * Be less picky if mutually recursive definitions appear in a different order
+ examples/Regression.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE TemplateHaskell #-}++-- This is a kitchen sink test file for various regressions+-- reported via GitHub++import Test.Inspection+++-- https://github.com/nomeata/inspection-testing/issues/35+empty1, empty2 :: [a]+empty1 = map id []+empty2 = []++inspect $ 'empty1 === 'empty2++main :: IO ()+main = return ()
inspection-testing.cabal view
@@ -1,5 +1,5 @@ name: inspection-testing-version: 0.4.2+version: 0.4.2.1 synopsis: GHC plugin to do inspection testing description: Some carefully crafted libraries make promises to their users beyond functionality and performance.@@ -173,3 +173,13 @@ build-depends: base >=4.9 && <4.13 default-language: Haskell2010 ghc-options: -main-is MutualRecursion++test-suite regression+ type: exitcode-stdio-1.0+ hs-source-dirs: examples+ main-is: Regression.hs+ build-depends: inspection-testing+ build-depends: base >=4.9 && <4.13+ default-language: Haskell2010+ if impl(ghc < 8.4)+ ghc-options: -fplugin=Test.Inspection.Plugin
src/Test/Inspection/Core.hs view
@@ -118,9 +118,11 @@ equate x y | Just e1 <- lookup x slice1 , Just x' <- essentiallyVar e1+ , x' `elem` map fst slice1 = lift $ modify (S.insert (x',y)) | Just e2 <- lookup y slice2 , Just y' <- essentiallyVar e2+ , y' `elem` map fst slice2 = lift $ modify (S.insert (x,y')) | Just e1 <- lookup x slice1 , Just e2 <- lookup y slice2