xpWrap )
import TSN.DbImport ( ImportResult(..) )
-import Xml ( pickle_unpickle )
+import Xml ( pickle_unpickle, unpickleable )
data Message =
Message {
heartbeat_tests =
testGroup
"Heartbeat tests"
- [ test_pickle_of_unpickle_is_identity ]
+ [ test_pickle_of_unpickle_is_identity,
+ test_unpickle_succeeds ]
+-- | Warning, succeess of this test does not mean that unpickling
+-- succeeded.
test_pickle_of_unpickle_is_identity :: TestTree
test_pickle_of_unpickle_is_identity =
testCase "pickle composed with unpickle is the identity" $ do
let path = "test/xml/Heartbeat.xml"
(expected :: [Message], actual) <- pickle_unpickle "message" path
actual @?= expected
+
+
+test_unpickle_succeeds :: TestTree
+test_unpickle_succeeds =
+ testCase "unpickling succeeds" $ do
+ let path = "test/xml/Heartbeat.xml"
+ actual <- unpickleable path pickle_message
+ let expected = True
+ actual @?= expected