module Test.Tasty.Providers
( IsTest(..)
, testPassed
, testFailed
, testFailedDetails
, Result
, Progress(..)
, TestName
, TestTree
, singleTest
)
where
import Test.Tasty.Core
import Test.Tasty.Providers.ConsoleFormat (ResultDetailsPrinter, noResultDetails)
singleTest :: IsTest t => TestName -> t -> TestTree
singleTest = SingleTest
testPassed
:: String
-> Result
testPassed desc = Result
{ resultOutcome = Success
, resultDescription = desc
, resultShortDescription = "OK"
, resultTime = 0
, resultDetailsPrinter = noResultDetails
}
testFailed
:: String
-> Result
testFailed desc = Result
{ resultOutcome = Failure TestFailed
, resultDescription = desc
, resultShortDescription = "FAIL"
, resultTime = 0
, resultDetailsPrinter = noResultDetails
}
testFailedDetails
:: String
-> ResultDetailsPrinter
-> Result
testFailedDetails desc printer = (testFailed desc)
{ resultDetailsPrinter = printer }