Hello community,

here is the log from the commit of package ghc-yesod-test for openSUSE:Factory 
checked in at 2017-08-31 21:02:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod-test (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-yesod-test.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-yesod-test"

Thu Aug 31 21:02:17 2017 rev:5 rq:513550 version:1.5.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod-test/ghc-yesod-test.changes    
2017-07-06 00:03:53.474142697 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yesod-test.new/ghc-yesod-test.changes       
2017-08-31 21:02:18.914085426 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:05:16 UTC 2017 - [email protected]
+
+- Update to version 1.5.8.
+
+-------------------------------------------------------------------

Old:
----
  yesod-test-1.5.7.tar.gz

New:
----
  yesod-test-1.5.8.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-yesod-test.spec ++++++
--- /var/tmp/diff_new_pack.3wCk6p/_old  2017-08-31 21:02:19.921943821 +0200
+++ /var/tmp/diff_new_pack.3wCk6p/_new  2017-08-31 21:02:19.937941573 +0200
@@ -19,7 +19,7 @@
 %global pkg_name yesod-test
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.5.7
+Version:        1.5.8
 Release:        0
 Summary:        Integration testing for WAI/Yesod Applications
 License:        MIT

++++++ yesod-test-1.5.7.tar.gz -> yesod-test-1.5.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-test-1.5.7/ChangeLog.md 
new/yesod-test-1.5.8/ChangeLog.md
--- old/yesod-test-1.5.7/ChangeLog.md   2017-06-22 18:16:04.000000000 +0200
+++ new/yesod-test-1.5.8/ChangeLog.md   2017-07-20 12:41:52.000000000 +0200
@@ -1,3 +1,7 @@
+## 1.5.8
+* Added implicit parameter HasCallStack to assertions.
+[#1421](https://github.com/yesodweb/yesod/pull/1421)
+
 ## 1.5.7
 
 * Add clickOn.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-test-1.5.7/Yesod/Test.hs 
new/yesod-test-1.5.8/Yesod/Test.hs
--- old/yesod-test-1.5.7/Yesod/Test.hs  2017-06-22 18:16:04.000000000 +0200
+++ new/yesod-test-1.5.8/Yesod/Test.hs  2017-07-20 12:41:52.000000000 +0200
@@ -4,6 +4,8 @@
 {-# LANGUAGE RecordWildCards #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE ImplicitParams #-}
+{-# LANGUAGE ConstraintKinds #-}
 
 {-|
 Yesod.Test is a pragmatic framework for testing web applications built
@@ -150,6 +152,16 @@
 import Control.Applicative ((<$>))
 import Text.Show.Pretty (ppShow)
 import Data.Monoid (mempty)
+#if MIN_VERSION_base(4,9,0)
+import GHC.Stack (HasCallStack)
+#elif MIN_VERSION_base(4,8,1)
+import GHC.Stack (CallStack)
+type HasCallStack = (?callStack :: CallStack)
+#else
+import GHC.Exts (Constraint)
+type HasCallStack = (() :: Constraint)
+#endif
+
 
 -- | The state used in a single test case defined using 'yit'
 --
@@ -330,7 +342,7 @@
 -- In case they are not equal, error mesasge includes the two values.
 --
 -- @since 1.5.2
-assertEq :: (Eq a, Show a) => String -> a -> a -> YesodExample site ()
+assertEq :: (HasCallStack, Eq a, Show a) => String -> a -> a -> YesodExample 
site ()
 assertEq m a b =
   liftIO $ HUnit.assertBool msg (a == b)
   where msg = "Assertion: " ++ m ++ "\n" ++
@@ -342,24 +354,24 @@
 -- In case they are equal, error mesasge includes the values.
 --
 -- @since 1.5.6
-assertNotEq :: (Eq a, Show a) => String -> a -> a -> YesodExample site ()
+assertNotEq :: (HasCallStack, Eq a, Show a) => String -> a -> a -> 
YesodExample site ()
 assertNotEq m a b =
   liftIO $ HUnit.assertBool msg (a /= b)
   where msg = "Assertion: " ++ m ++ "\n" ++
               "Both arguments:  " ++ ppShow a ++ "\n"
 
 {-# DEPRECATED assertEqual "Use assertEq instead" #-}
-assertEqual :: (Eq a) => String -> a -> a -> YesodExample site ()
+assertEqual :: (HasCallStack, Eq a) => String -> a -> a -> YesodExample site ()
 assertEqual = assertEqualNoShow
 
 -- | Asserts that the two given values are equal.
 --
 -- @since 1.5.2
-assertEqualNoShow :: (Eq a) => String -> a -> a -> YesodExample site ()
+assertEqualNoShow :: (HasCallStack, Eq a) => String -> a -> a -> YesodExample 
site ()
 assertEqualNoShow msg a b = liftIO $ HUnit.assertBool msg (a == b)
 
 -- | Assert the last response status is as expected.
-statusIs :: Int -> YesodExample site ()
+statusIs :: HasCallStack => Int -> YesodExample site ()
 statusIs number = withResponse $ \ SResponse { simpleStatus = s } ->
   liftIO $ flip HUnit.assertBool (H.statusCode s == number) $ concat
     [ "Expected status was ", show number
@@ -367,7 +379,7 @@
     ]
 
 -- | Assert the given header key/value pair was returned.
-assertHeader :: CI BS8.ByteString -> BS8.ByteString -> YesodExample site ()
+assertHeader :: HasCallStack => CI BS8.ByteString -> BS8.ByteString -> 
YesodExample site ()
 assertHeader header value = withResponse $ \ SResponse { simpleHeaders = h } ->
   case lookup header h of
     Nothing -> failure $ T.pack $ concat
@@ -387,7 +399,7 @@
         ]
 
 -- | Assert the given header was not included in the response.
-assertNoHeader :: CI BS8.ByteString -> YesodExample site ()
+assertNoHeader :: HasCallStack => CI BS8.ByteString -> YesodExample site ()
 assertNoHeader header = withResponse $ \ SResponse { simpleHeaders = h } ->
   case lookup header h of
     Nothing -> return ()
@@ -400,14 +412,14 @@
 
 -- | Assert the last response is exactly equal to the given text. This is
 -- useful for testing API responses.
-bodyEquals :: String -> YesodExample site ()
+bodyEquals :: HasCallStack => String -> YesodExample site ()
 bodyEquals text = withResponse $ \ res ->
   liftIO $ HUnit.assertBool ("Expected body to equal " ++ text) $
     (simpleBody res) == encodeUtf8 (TL.pack text)
 
 -- | Assert the last response has the given text. The check is performed using 
the response
 -- body in full text form.
-bodyContains :: String -> YesodExample site ()
+bodyContains :: HasCallStack => String -> YesodExample site ()
 bodyContains text = withResponse $ \ res ->
   liftIO $ HUnit.assertBool ("Expected body to contain " ++ text) $
     (simpleBody res) `contains` text
@@ -415,7 +427,7 @@
 -- | Assert the last response doesn't have the given text. The check is 
performed using the response
 -- body in full text form.
 -- @since 1.5.3
-bodyNotContains :: String -> YesodExample site ()
+bodyNotContains :: HasCallStack => String -> YesodExample site ()
 bodyNotContains text = withResponse $ \ res ->
   liftIO $ HUnit.assertBool ("Expected body not to contain " ++ text) $
     not $ contains (simpleBody res) text
@@ -425,7 +437,7 @@
 
 -- | Queries the HTML using a CSS selector, and all matched elements must 
contain
 -- the given string.
-htmlAllContain :: Query -> String -> YesodExample site ()
+htmlAllContain :: HasCallStack => Query -> String -> YesodExample site ()
 htmlAllContain query search = do
   matches <- htmlQuery query
   case matches of
@@ -437,7 +449,7 @@
 -- element contains the given string.
 --
 -- Since 0.3.5
-htmlAnyContain :: Query -> String -> YesodExample site ()
+htmlAnyContain :: HasCallStack => Query -> String -> YesodExample site ()
 htmlAnyContain query search = do
   matches <- htmlQuery query
   case matches of
@@ -450,7 +462,7 @@
 -- inverse of htmlAnyContains).
 --
 -- Since 1.2.2
-htmlNoneContain :: Query -> String -> YesodExample site ()
+htmlNoneContain :: HasCallStack => Query -> String -> YesodExample site ()
 htmlNoneContain query search = do
   matches <- htmlQuery query
   case DL.filter (DL.isInfixOf search) (map (TL.unpack . decodeUtf8) matches) 
of
@@ -460,7 +472,7 @@
 
 -- | Performs a CSS query on the last response and asserts the matched elements
 -- are as many as expected.
-htmlCount :: Query -> Int -> YesodExample site ()
+htmlCount :: HasCallStack => Query -> Int -> YesodExample site ()
 htmlCount query count = do
   matches <- fmap DL.length $ htmlQuery query
   liftIO $ flip HUnit.assertBool (matches == count)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-test-1.5.7/yesod-test.cabal 
new/yesod-test-1.5.8/yesod-test.cabal
--- old/yesod-test-1.5.7/yesod-test.cabal       2017-06-22 18:16:04.000000000 
+0200
+++ new/yesod-test-1.5.8/yesod-test.cabal       2017-07-20 12:41:52.000000000 
+0200
@@ -1,5 +1,5 @@
 name:               yesod-test
-version:            1.5.7
+version:            1.5.8
 license:            MIT
 license-file:       LICENSE
 author:             Nubis <[email protected]>


Reply via email to