2019-11-29 20:33:52 +01:00
|
|
|
--------------------------------------------------------------------------------
|
2019-11-30 04:59:15 +01:00
|
|
|
module Xanthous.Data.EntityCharSpec where
|
2019-11-29 20:33:52 +01:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
import Test.Prelude
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
import qualified Data.Aeson as JSON
|
|
|
|
--------------------------------------------------------------------------------
|
2019-11-30 04:59:15 +01:00
|
|
|
import Xanthous.Data.EntityChar
|
2019-11-29 20:33:52 +01:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
main :: IO ()
|
|
|
|
main = defaultMain test
|
|
|
|
|
|
|
|
test :: TestTree
|
2019-11-30 04:59:15 +01:00
|
|
|
test = testGroup "Xanthous.Data.EntityChar"
|
|
|
|
[ testProperty "JSON round-trip" $ \(ec :: EntityChar) ->
|
|
|
|
JSON.decode (JSON.encode ec) === Just ec
|
2019-11-29 20:33:52 +01:00
|
|
|
]
|