18 lines
514 B
Haskell
18 lines
514 B
Haskell
import SortImports
|
|
import SortImports.Types
|
|
import Test.Tasty
|
|
import Test.Tasty.HUnit
|
|
|
|
main :: IO ()
|
|
main = defaultMain $ testGroup "Tests" [unitTests]
|
|
|
|
unitTests :: TestTree
|
|
unitTests = testGroup "Unit tests"
|
|
[ testCase "" $
|
|
lineType "not a module" @?= CodeLine "not a module"
|
|
, testCase "" $
|
|
lineType "import ModuleName" @?= ModuleLine (Module False "ModuleName" Nothing Nothing)
|
|
, testCase "" $
|
|
lineType "import ModuleName" @?= ModuleLine (Module False "ModuleName" Nothing Nothing)
|
|
]
|