Skip to content

Commit

Permalink
Fix test-suite on aeson-0.10, error messages vary between aeson versi…
Browse files Browse the repository at this point in the history
  • Loading branch information
bergmark committed Dec 18, 2015
1 parent 7bf0f33 commit 4476a02
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/Main.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{-# OPTIONS -fno-warn-missing-signatures #-}
{-# LANGUAGE
DeriveGeneric
CPP
, DeriveGeneric
, OverloadedStrings
, ScopedTypeVariables
, TemplateHaskell
Expand Down Expand Up @@ -267,8 +268,13 @@ case_constructorWithMaybeField = do
bidir "[null,2]" b
valid b

#if MIN_VERSION_aeson(0,10,0)
eq (Left "Error in $: expected Int, encountered Boolean" :: Either String X)
(eitherDecode "[true,2]")
#else
eq (Left "when expecting a Int, encountered Boolean instead" :: Either String X)
(eitherDecode "[true,2]")
#endif

eq (Tuple [nullable number, number])
(schema (Proxy :: Proxy X))
Expand Down

0 comments on commit 4476a02

Please sign in to comment.