Fix tests

This commit is contained in:
Ali Abrar 2023-07-24 13:37:49 -04:00
parent d11e3fcfa5
commit fc327d7e3f

View File

@ -9,11 +9,11 @@ main = defaultMain $ testGroup "Tests" [unitTests]
unitTests :: TestTree
unitTests = testGroup "Unit tests"
[ testCase "" $
lineType "not a module" @?= CodeLine "not a module"
lineType Nothing "not a module" @?= CodeLine "not a module"
, testCase "bare" $
lineType "import ModuleName" @?= ModuleLine (Module Nothing "ModuleName" Nothing Nothing)
lineType Nothing "import ModuleName" @?= ModuleLine (Module Nothing "ModuleName" Nothing Nothing)
, testCase "pre-qualified" $
lineType "import qualified ModuleName" @?= ModuleLine (Module (Just Qualified_Pre) "ModuleName" Nothing Nothing)
lineType Nothing "import qualified ModuleName" @?= ModuleLine (Module (Just Qualified_Pre) "ModuleName" Nothing Nothing)
, testCase "post-qualified" $
lineType "import ModuleName qualified as Mod" @?= ModuleLine (Module (Just Qualified_Post) "ModuleName" (Just "Mod") Nothing)
lineType Nothing "import ModuleName qualified as Mod" @?= ModuleLine (Module (Just Qualified_Post) "ModuleName" (Just "Mod") Nothing)
]