X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FGameInfo.hs;h=8938200ec480e7765cd8d75732d3c1a635be7b9c;hb=b45f24209ce6f1eb3c24a5f01a71f5940a001c02;hp=421d28693b6d0e7678432c9ccfdbc930db06013f;hpb=2e387e1e615e510b31a4c8ae38da4e4a718fd352;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/GameInfo.hs b/src/TSN/XML/GameInfo.hs index 421d286..8938200 100644 --- a/src/TSN/XML/GameInfo.hs +++ b/src/TSN/XML/GameInfo.hs @@ -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