packages feed

tasty-discover-5.1.0: test-no-main/Tests.hs

{-# OPTIONS_GHC -F -pgmF tasty-discover -optF --no-main -optF --generated-module -optF Tests -optF --in-place #-}
-- GENERATED BY tasty-discover
{-# LANGUAGE FlexibleInstances #-}

module Tests (ingredients, tests) where

import Prelude
import qualified Test.Tasty as T
import qualified Test.Tasty.Discover as TD
import qualified Test.Tasty.HUnit as HU
import qualified Test.Tasty.Ingredients as T
import qualified Test.Tasty.QuickCheck as QC
import qualified Tests.Simple

{- HLINT ignore "Evaluate" -}
{- HLINT ignore "Use let" -}



class TestCase a where testCase :: String -> a -> IO T.TestTree
instance TestCase (IO ())                      where testCase n = pure . HU.testCase      n
instance TestCase (IO String)                  where testCase n = pure . HU.testCaseInfo  n
instance TestCase ((String -> IO ()) -> IO ()) where testCase n = pure . HU.testCaseSteps n

tests :: IO T.TestTree
tests = do
  t0 <- testCase "simpleTest" Tests.Simple.unit_simpleTest

  t1 <- pure $ QC.testProperty "alwaysTrue" Tests.Simple.prop_alwaysTrue

  t2 <- TD.tasty (TD.description "customGroup" <> TD.name "Tests.Simple.tasty_customGroup") Tests.Simple.tasty_customGroup

  pure $ T.testGroup "test-no-main/Tests.hs" [t0,t1,t2]
ingredients :: [T.Ingredient]
ingredients = T.defaultIngredients