sandwich 0.1.0.4 → 0.1.0.5
raw patch · 7 files changed
+13/−12 lines, 7 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Test.Sandwich.Formatters.FailureReport: ($sel:failureReportIncludeCallStacks:FailureReportFormatter) :: FailureReportFormatter -> Bool
- Test.Sandwich.Formatters.FailureReport: ($sel:failureReportIndentSize:FailureReportFormatter) :: FailureReportFormatter -> Int
- Test.Sandwich.Formatters.FailureReport: ($sel:failureReportLogLevel:FailureReportFormatter) :: FailureReportFormatter -> Maybe LogLevel
- Test.Sandwich.Formatters.FailureReport: ($sel:failureReportUseColor:FailureReportFormatter) :: FailureReportFormatter -> Bool
- Test.Sandwich.Formatters.FailureReport: ($sel:failureReportVisibilityThreshold:FailureReportFormatter) :: FailureReportFormatter -> Int
+ Test.Sandwich.Formatters.FailureReport: failureReportIncludeCallStacks :: FailureReportFormatter -> Bool
+ Test.Sandwich.Formatters.FailureReport: failureReportIndentSize :: FailureReportFormatter -> Int
+ Test.Sandwich.Formatters.FailureReport: failureReportLogLevel :: FailureReportFormatter -> Maybe LogLevel
+ Test.Sandwich.Formatters.FailureReport: failureReportUseColor :: FailureReportFormatter -> Bool
+ Test.Sandwich.Formatters.FailureReport: failureReportVisibilityThreshold :: FailureReportFormatter -> Int
+ Test.Sandwich.Formatters.LogSaver: logSaverFormatter :: LogSaverFormatter -> LogEntryFormatter
+ Test.Sandwich.Formatters.LogSaver: type LogEntryFormatter = UTCTime -> Loc -> LogSource -> LogLevel -> LogStr -> ByteString
+ Test.Sandwich.Formatters.Silent: defaultSilentFormatter :: SilentFormatter
+ Test.Sandwich.Formatters.Silent: instance GHC.Show.Show Test.Sandwich.Formatters.Silent.SilentFormatter
+ Test.Sandwich.Formatters.Silent: instance Test.Sandwich.Types.RunTree.Formatter Test.Sandwich.Formatters.Silent.SilentFormatter
+ Test.Sandwich.Formatters.Silent: silentFormatterPrintRunRoot :: SilentFormatter -> Bool
Files
- sandwich.cabal +3/−3
- src/Test/Sandwich/Formatters/FailureReport.hs +2/−1
- src/Test/Sandwich/Formatters/LogSaver.hs +4/−0
- src/Test/Sandwich/Formatters/Print.hs +0/−1
- src/Test/Sandwich/Formatters/Silent.hs +2/−6
- src/Test/Sandwich/Formatters/TerminalUI.hs +0/−1
- src/Test/Sandwich/Types/RunTree.hs +2/−0
sandwich.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: c62375ea166e8c3dbfd6a334d0b931122503e76c6515910590a24530dca64d42+-- hash: 244c3e7999c4afac51c061a4e2ca5575aeb323ac3ee3c20b70f36df7a861a50d name: sandwich-version: 0.1.0.4+version: 0.1.0.5 synopsis: Yet another test framework for Haskell description: Please see the <https://codedownio.github.io/sandwich documentation>. category: Testing@@ -38,6 +38,7 @@ Test.Sandwich.Formatters.FailureReport Test.Sandwich.Formatters.LogSaver Test.Sandwich.Formatters.Print+ Test.Sandwich.Formatters.Silent Test.Sandwich.Formatters.TerminalUI Test.Sandwich.Internal Test.Sandwich.TH@@ -54,7 +55,6 @@ Test.Sandwich.Formatters.Print.PrintPretty Test.Sandwich.Formatters.Print.Types Test.Sandwich.Formatters.Print.Util- Test.Sandwich.Formatters.Silent Test.Sandwich.Formatters.TerminalUI.AttrMap Test.Sandwich.Formatters.TerminalUI.CrossPlatform Test.Sandwich.Formatters.TerminalUI.Draw
src/Test/Sandwich/Formatters/FailureReport.hs view
@@ -4,11 +4,12 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} -- | The failure report formatter is like the print formatter, but it only shows failures.+--+-- Documentation can be found <https://codedownio.github.io/sandwich/docs/formatters/failure_report here>. module Test.Sandwich.Formatters.FailureReport ( defaultFailureReportFormatter
src/Test/Sandwich/Formatters/LogSaver.hs view
@@ -5,6 +5,8 @@ -- | A simple formatter that saves all logs from the test to a file. -- -- This is a "secondary formatter," i.e. one that can run in the background while a "primary formatter" (such as the TerminalUI or Print formatters) monopolize the foreground.+--+-- Documentation can be found <https://codedownio.github.io/sandwich/docs/formatters/log_saver here>. module Test.Sandwich.Formatters.LogSaver ( defaultLogSaverFormatter@@ -12,9 +14,11 @@ -- * Options , logSaverPath , logSaverLogLevel+ , logSaverFormatter -- * Auxiliary types , LogPath(..)+ , LogEntryFormatter ) where import Control.Concurrent.STM
src/Test/Sandwich/Formatters/Print.hs view
@@ -4,7 +4,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE MultiWayIf #-} -- | The print formatter prints all results from the test tree from top to bottom, as they become available.
src/Test/Sandwich/Formatters/Silent.hs view
@@ -1,16 +1,12 @@-{-# LANGUAGE ViewPatterns #-}-{-# LANGUAGE NamedFieldPuns #-}-{-# LANGUAGE LambdaCase #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE QuasiQuotes #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} -- | The silent formatter does nothing except print the test root folder path, if present. -- -- This is provided as an explicit formatter so it can print that single line. If you don't want anything at all to be printed, you can just run with no formatters.+--+-- Documentation can be found <https://codedownio.github.io/sandwich/docs/formatters/silent here>. module Test.Sandwich.Formatters.Silent ( defaultSilentFormatter
src/Test/Sandwich/Formatters/TerminalUI.hs view
@@ -5,7 +5,6 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE ViewPatterns #-}
src/Test/Sandwich/Types/RunTree.hs view
@@ -210,6 +210,8 @@ newtype TreeFilter = TreeFilter String type LogFn = Loc -> LogSource -> LogLevel -> LogStr -> IO ()++-- | A callback for formatting a log entry to a 'BS8.ByteString'. type LogEntryFormatter = UTCTime -> Loc -> LogSource -> LogLevel -> LogStr -> BS8.ByteString -- The defaultLogStr formatter weirdly puts information after the message. Use our own