@@ -5,6 +5,7 @@
55{-# LANGUAGE OverloadedStrings #-}
66{-# LANGUAGE ScopedTypeVariables #-}
77{-# LANGUAGE TemplateHaskell #-}
8+{-# LANGUAGE QuasiQuotes #-}
89
910-- For Data.Aeson.Types.camelTo
1011{-# OPTIONS_GHC -fno-warn-deprecations #-}
@@ -25,6 +26,7 @@ import Prelude.Compat
2526import Control.Monad (forM, forM_)
2627import Data.Aeson ((.=), (.:), (.:?), (.:!), FromJSON(..), FromJSONKeyFunction(..), FromJSONKey(..), ToJSON1(..), decode, eitherDecode, encode, fromJSON, genericParseJSON, genericToEncoding, genericToJSON, object, withObject, withEmbeddedJSON)
2728import Data.Aeson.Internal (JSONPathElement(..), formatError)
29+import Data.Aeson.QQ.Simple (aesonQQ)
2830import Data.Aeson.TH (deriveJSON, deriveToJSON, deriveToJSON1)
2931import Data.Aeson.Text (encodeToTextBuilder)
3032import Data.Aeson.Types (Options(..), Result(Success), ToJSON(..), Value(Null, Object), camelTo, camelTo2, defaultOptions, omitNothingFields, parse)
@@ -108,6 +110,10 @@ tests = testGroup "unit" [
108110 , testCase "Big integer decoding" bigIntegerDecoding
109111 , testCase "Big natural decading" bigNaturalDecoding
110112 , testCase "Big integer key decoding" bigIntegerKeyDecoding
113+ , testGroup "QQ.Simple"
114+ [ testCase "example" $
115+ assertEqual "" (object ["foo" .= True]) [aesonQQ| {"foo": true } |]
116+ ]
111117 ]
112118
113119roundTripCamel :: String -> Assertion