tasty-inspection-testing: Inspection testing support for tasty

[ library, mit, testing ] [ Propose Tags ]

Integrate inspection-testing into tasty test suites.

[Skip to Readme]
Versions [RSS] [faq] 0.1
Change log changelog.md
Dependencies base (<5), ghc, inspection-testing (>=0.4.5 && <0.5), tasty, template-haskell [details]
License MIT
Copyright 2017 Joachim Breitner, 2021 Andrew Lelechenko
Maintainer Andrew Lelechenko <andrew.lelechenko@gmail.com>
Category Testing
Home page https://github.com/Bodigrim/tasty-inspection-testing
Bug tracker https://github.com/Bodigrim/tasty-inspection-testing/issues
Source repo head: git clone https://github.com/Bodigrim/tasty-inspection-testing
Uploaded by Bodigrim at 2021-05-06T19:38:54Z
Distributions Arch:0.1, LTSHaskell:0.1, NixOS:0.1, Stackage:0.1
Downloads 546 total (67 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-05-06 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees


Readme for tasty-inspection-testing-0.1

[back to package description]


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)