tasty-inspection-testing

Inspection testing support for tasty

https://github.com/Bodigrim/tasty-inspection-testing

Version on this page:0.2@rev:1
LTS Haskell 22.14:0.2.1
Stackage Nightly 2024-03-29:0.2.1
Latest on Hackage:0.2.1

See all snapshots tasty-inspection-testing appears in

MIT licensed by Joachim Breitner, Andrew Lelechenko
Maintained by Andrew Lelechenko
This version can be pinned in stack with:tasty-inspection-testing-0.2@sha256:cfc8344b474eb3c61d978edc173f43d4ec2205a6da6b44540c8edfd53fca6994,1339

Module documentation for 0.2

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.2

  • Support inspection-testing-0.5.

0.1.0.1

  • Support GHC 9.4.

0.1

  • Initial release.