From 8eb592bc159adc1bc169e3c26cefb050e8392661 Mon Sep 17 00:00:00 2001 From: Oswyn Brent Date: Tue, 23 Jun 2015 14:55:13 +1000 Subject: [PATCH] Fix ordering of CPP directive for aeson test If the version of aeson used is below 0.9 the current ordering results in an empty do block. --- servant/test/Servant/API/ContentTypesSpec.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servant/test/Servant/API/ContentTypesSpec.hs b/servant/test/Servant/API/ContentTypesSpec.hs index 407ccdb9..1dbd64b9 100644 --- a/servant/test/Servant/API/ContentTypesSpec.hs +++ b/servant/test/Servant/API/ContentTypesSpec.hs @@ -160,10 +160,10 @@ spec = describe "Servant.API.ContentTypes" $ do (encode val) `shouldBe` Just (Right val) +#if MIN_VERSION_aeson(0,9,0) + -- aeson >= 0.9 decodes top-level strings describe "eitherDecodeLenient" $ do - -- aeson >= 0.9 decodes top-level strings -#if MIN_VERSION_aeson(0,9,0) it "parses top-level strings" $ do let toMaybe = either (const Nothing) Just -- The Left messages differ, so convert to Maybe