MIT licensed by Joachim Breitner, Andrew Lelechenko
Maintained by Andrew Lelechenko
This version can be pinned in stack with:tasty-inspection-testing-0.1.0.1@sha256:55c4f83cad5c85453e45b585b44b42d94b8279fee53ed71ce0a7c7209ab2b74e,1293

Module documentation for 0.1.0.1

tasty-inspection-tasting

Integrate inspection-testing into tasty test suites.

{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -O -dsuppress-all -dno-suppress-type-signatures -fplugin=Test.Tasty.Inspection.Plugin #-}

import Test.Tasty
import Test.Tasty.Inspection

lhs :: (a -> b) -> Maybe a -> Bool
lhs f x = case fmap f x of
  Nothing -> True
  Just{}  -> False

rhs :: (a -> b) -> Maybe a -> Bool
rhs _ Nothing = True
rhs _ Just{}  = False

main :: IO ()
main = defaultMain $(inspectTest $ 'lhs === 'rhs)

Real world examples:

Changes

0.1.0.1

  • Support GHC 9.4.

0.1

  • Initial release.