git.iko.soy/typeable/servant
on master help sign in
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.

commit8eb592bc159adc1bc169e3c26cefb050e8392661 authorOswyn Brent <oswyn.brent@anchor.com.au> dateTue 23 Jun 2015, 14:55 (11 years ago) parent7399f30
1 file changed+2−2
servant/test/Servant/API/ContentTypesSpec.hs+2−2
servant/test/Servant/API/ContentTypesSpec.hs+2−2
@@ -160,10 +160,10 @@ spec = describe "Servant.API.ContentTypes" $ do
160160 (encode val)
161161 `shouldBe` Just (Right val)
162162
163+#if MIN_VERSION_aeson(0,9,0)
164+ -- aeson >= 0.9 decodes top-level strings
163165 describe "eitherDecodeLenient" $ do
164166
165− -- aeson >= 0.9 decodes top-level strings
166−#if MIN_VERSION_aeson(0,9,0)
167167 it "parses top-level strings" $ do
168168 let toMaybe = either (const Nothing) Just
169169 -- The Left messages differ, so convert to Maybe