tasty-kat-0.0.1: Known Answer Tests (KAT) framework for tasty

LicenseMIT
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
PortabilityGood
Safe HaskellNone
LanguageHaskell2010

Test.Tasty.KAT

Contents

Description

Tasty support for KAT (Known Answer Tests)

Synopsis

Run tests

testKatDetailed :: TestName -> Resource a -> (String -> a -> IO Bool) -> TestTree Source

run one tasty test per vectors in each groups

This is useful to have detailed output on what failed and what succeeded. For a more concise output, use testKatGrouped

testKatGrouped :: TestName -> Resource a -> (String -> a -> IO Bool) -> TestTree Source

run one tasty test per group

Load KAT resources

testKatLoad :: FilePath -> ([String] -> [(String, [a])]) -> IO (Resource a) Source

Read a KAT file into values that will be used for KATs tests

newtype Resource a Source

Constructors

Resource [(String, [a])] 

katLoaderSimple :: [String] -> TestResource (String, String) Source

From a simple KAT file, extract

  • lines starting by #, are assumed to be comment

format should be the following:

skipped ..
skipped ..
[group1]

f1= v1
f2= v2
...

f1= v3
f2= v4
...

[group2]
...