Skip to content

Commit a8944c3

Browse files
committed
tests: use @? operator
1 parent 1da8c79 commit a8944c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Cabal-tests/tests/ParserTests.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Test.Tasty
1010
import Test.Tasty.Golden.Advanced (goldenTest)
1111
import Test.Tasty.HUnit
1212

13-
import Control.Monad (unless, void)
13+
import Control.Monad (void)
1414
import Data.Algorithm.Diff (PolyDiff (..), getGroupedDiff)
1515
import Data.Maybe (isNothing)
1616
import Distribution.Fields (pwarning)
@@ -276,15 +276,15 @@ formatRoundTripTest fp = testCase "roundtrip" $ do
276276
y <- parse (toUTF8BS contents')
277277

278278
let checkField field =
279-
unless (field x == field y) $
279+
field x == field y @?
280280
{- FOURMOLU_DISABLE -}
281281
#ifdef MIN_VERSION_tree_diff
282-
assertFailure $ unlines
282+
unlines
283283
[ "re-parsed doesn't match"
284284
, show $ ansiWlEditExpr $ ediff x y
285285
]
286286
#else
287-
assertFailure $ unlines
287+
unlines
288288
[ "re-parsed doesn't match"
289289
, "expected"
290290
, show x

0 commit comments

Comments
 (0)