]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/TSN/XML/GameInfo.hs
Add SportInfo support for CBASK_FoulsXML.dtd.
[dead/htsn-import.git] / src / TSN / XML / GameInfo.hs
index 421d28693b6d0e7678432c9ccfdbc930db06013f..8938200ec480e7765cd8d75732d3c1a635be7b9c 100644 (file)
@@ -13,7 +13,7 @@
 --
 module TSN.XML.GameInfo (
   dtds,
-  gameinfo_tests,
+  game_info_tests,
   parse_xml,
   -- * WARNING: these are private but exported to silence warnings
   GameInfoConstructor(..) )
@@ -171,8 +171,8 @@ mkPersist tsn_codegen_config [groundhog|
 
 -- | A list of all tests for this module.
 --
-gameinfo_tests :: TestTree
-gameinfo_tests =
+game_info_tests :: TestTree
+game_info_tests =
   testGroup
     "GameInfo tests"
     [ test_parse_xml_succeeds,
@@ -181,8 +181,8 @@ gameinfo_tests =
 
 -- | Sample XML documents for GameInfo types.
 --
-gameinfo_test_files :: [FilePath]
-gameinfo_test_files =
+game_info_test_files :: [FilePath]
+game_info_test_files =
   [ "test/xml/gameinfo/CBASK_Lineup_XML.xml",
     "test/xml/gameinfo/cbaskpreviewxml.xml",
     "test/xml/gameinfo/cflpreviewxml.xml",
@@ -204,11 +204,11 @@ gameinfo_test_files =
     "test/xml/gameinfo/WorldBaseballPreviewXML.xml" ]
 
 
--- | Make sure we can parse every element of 'gameinfo_test_files'.
+-- | Make sure we can parse every element of 'game_info_test_files'.
 --
 test_parse_xml_succeeds :: TestTree
 test_parse_xml_succeeds =
-  testGroup "parse_xml" $ map check gameinfo_test_files
+  testGroup "parse_xml" $ map check game_info_test_files
   where
     check t = testCase t $ do
       x <- unsafe_read_document t
@@ -220,14 +220,14 @@ test_parse_xml_succeeds =
       actual @?= expected
 
 
--- | Ensure that each element of 'gameinfo_test_files' can be imported
+-- | Ensure that each element of 'game_info_test_files' can be imported
 --   by counting the total number of database records (after
 --   importing) and comparing it against the length of
---   'gameinfo_test_files'.
+--   'game_info_test_files'.
 --
 test_dbimport_succeeds :: TestTree
 test_dbimport_succeeds = testCase "dbimport succeeds" $ do
-  xmltrees <- mapM unsafe_read_document gameinfo_test_files
+  xmltrees <- mapM unsafe_read_document game_info_test_files
   let msgs = rights $ map (parse_xml "dummy") xmltrees
   actual <- withSqliteConn ":memory:" $ runDbConn $ do
                 runMigration silentMigrationLogger $ do
@@ -237,4 +237,4 @@ test_dbimport_succeeds = testCase "dbimport succeeds" $ do
 
   actual @?= expected
   where
-    expected = length gameinfo_test_files
+    expected = length game_info_test_files