module Test.Tasty.Providers.ConsoleFormat
( ResultDetailsPrinter(..)
, ConsoleFormat(..)
, ConsoleFormatPrinter
, noResultDetails
, failFormat
, infoFailFormat
, infoOkFormat
, okFormat
, skippedFormat
)
where
import System.Console.ANSI
data ConsoleFormat = ConsoleFormat
{ ConsoleFormat -> ConsoleIntensity
consoleIntensity :: ConsoleIntensity
, ConsoleFormat -> ColorIntensity
colorIntensity :: ColorIntensity
, ConsoleFormat -> Color
color :: Color
}
type ConsoleFormatPrinter
= ConsoleFormat
-> IO ()
-> IO ()
noResultDetails :: ResultDetailsPrinter
noResultDetails :: ResultDetailsPrinter
noResultDetails = (Int -> ConsoleFormatPrinter -> IO ()) -> ResultDetailsPrinter
ResultDetailsPrinter forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. a -> b -> a
const forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. a -> b -> a
const forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a. Monad m => a -> m a
return ()
newtype ResultDetailsPrinter = ResultDetailsPrinter
(Int -> ConsoleFormatPrinter -> IO ())
instance Show ResultDetailsPrinter where
show :: ResultDetailsPrinter -> String
show ResultDetailsPrinter
_printer = String
"ResultDetailsPrinter"
failFormat :: ConsoleFormat
failFormat :: ConsoleFormat
failFormat = ConsoleIntensity -> ColorIntensity -> Color -> ConsoleFormat
ConsoleFormat ConsoleIntensity
BoldIntensity ColorIntensity
Vivid Color
Red
infoFailFormat :: ConsoleFormat
infoFailFormat :: ConsoleFormat
infoFailFormat = ConsoleIntensity -> ColorIntensity -> Color -> ConsoleFormat
ConsoleFormat ConsoleIntensity
NormalIntensity ColorIntensity
Dull Color
Red
okFormat :: ConsoleFormat
okFormat :: ConsoleFormat
okFormat = ConsoleIntensity -> ColorIntensity -> Color -> ConsoleFormat
ConsoleFormat ConsoleIntensity
NormalIntensity ColorIntensity
Dull Color
Green
infoOkFormat :: ConsoleFormat
infoOkFormat :: ConsoleFormat
infoOkFormat = ConsoleIntensity -> ColorIntensity -> Color -> ConsoleFormat
ConsoleFormat ConsoleIntensity
NormalIntensity ColorIntensity
Dull Color
White
skippedFormat :: ConsoleFormat
skippedFormat :: ConsoleFormat
skippedFormat = ConsoleIntensity -> ColorIntensity -> Color -> ConsoleFormat
ConsoleFormat ConsoleIntensity
NormalIntensity ColorIntensity
Dull Color
Magenta