Fix tests
This commit is contained in:
parent
d11e3fcfa5
commit
fc327d7e3f
@ -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)
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user