packages feed

tasty-checklist 1.0.0.0 → 1.0.1.0

raw patch · 3 files changed

+19/−9 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Revision history for tasty-checklist +## 1.0.1.0 -- 2021-06-27++* ASCII output, no UTF-8.+* More information on failures regarding input and value obtained from+  input relative to expected value.+ ## 1.0.0.0 -- 2021-04-20  * Initial version.
src/Test/Tasty/Checklist.hs view
@@ -79,8 +79,8 @@ instance Show ChecklistFailures where   show (ChecklistFailures topMsg fails) =     "ERROR: " <> T.unpack topMsg <> "\n  " <>-    show (length fails) <> " checks failed in this checklist:\n  ↪" <>-    List.intercalate "\n  ↪" (show <$> fails)+    show (length fails) <> " checks failed in this checklist:\n  -" <>+    List.intercalate "\n  -" (show <$> fails)  -- | A convenient Constraint to apply to functions that will perform -- checks (i.e. call 'check' one or more times)@@ -104,7 +104,7 @@                           unless (null cs) $ do                             hFlush stdout                             hPutStrLn stderr ""-                            let pfx = "        ⚠ "+                            let pfx = "        WARN "                             mapM_ (hPutStrLn stderr . (pfx <>) . show) cs                             hFlush stderr                      )@@ -133,8 +133,8 @@ -- tst1: FAIL --   Exception: ERROR: numbers --     2 checks failed in this checklist:---     ↪Failed check of "two is odd" with "2"---     ↪Failed check of "7 + 3 is odd" with "10"+--     -Failed check of "two is odd" with "2"+--     -Failed check of "7 + 3 is odd" with "10" -- -- Any check failures are also printed to stdout (and omitted from the -- above for clarity).  This is so that those failures are reported@@ -216,8 +216,8 @@ -- >>> defaultMain test -- ERROR: on input "The answer to the universe is 18?" --   2 checks failed:---   ↪Failed check of "foo" with "42"---   ↪Failed check of "shown" with "The answer to the universe is 42!"+--   -Failed check of "foo" with "42"+--   -Failed check of "shown" with "The answer to the universe is 42!" -- -- In this case, several of the values checked were correct, but more -- than one was wrong.  Helpfully, this test output lists /all/ the@@ -234,7 +234,11 @@          => TestShow dType          => dType -> Ctx.Index idx valType -> DerivedVal dType valType -> IO () chkValue got _idx (Val txt fld v) =-  check (txt <> " on input «" <> T.pack (testShow got) <> "»") (fld got ==) v+  let r = fld got+      msg = txt <> " on input <<" <> ti <> ">> got <<" <> tr <> ">>"+      ti = T.pack (testShow got)+      tr = T.pack (testShow r)+  in check msg (r ==) v   -- | Each entry in the 'Data.Parameterized.Context.Assignment' list
tasty-checklist.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.2 name:               tasty-checklist-version:            1.0.0.0+version:            1.0.1.0 synopsis:           Check multiple items during a tasty test description:    Allows the test to check a number of items during a test and