about summary refs log tree commit diff
path: root/users/aspen/xanthous/test/Xanthous/Data/EntityCharSpec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'users/aspen/xanthous/test/Xanthous/Data/EntityCharSpec.hs')
-rw-r--r--users/aspen/xanthous/test/Xanthous/Data/EntityCharSpec.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/users/aspen/xanthous/test/Xanthous/Data/EntityCharSpec.hs b/users/aspen/xanthous/test/Xanthous/Data/EntityCharSpec.hs
new file mode 100644
index 0000000000..9e8024c9d2
--- /dev/null
+++ b/users/aspen/xanthous/test/Xanthous/Data/EntityCharSpec.hs
@@ -0,0 +1,18 @@
+--------------------------------------------------------------------------------
+module Xanthous.Data.EntityCharSpec where
+--------------------------------------------------------------------------------
+import           Test.Prelude
+--------------------------------------------------------------------------------
+import qualified Data.Aeson as JSON
+--------------------------------------------------------------------------------
+import           Xanthous.Data.EntityChar
+--------------------------------------------------------------------------------
+
+main :: IO ()
+main = defaultMain test
+
+test :: TestTree
+test = testGroup "Xanthous.Data.EntityChar"
+  [ testProperty "JSON round-trip" $ \(ec :: EntityChar) ->
+      JSON.decode (JSON.encode ec) === Just ec
+  ]