aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAvi Dessauer <avi.the.coder@gmail.com>2019-08-21 06:03:31 -0400
committerAlexey Kiryushin <alexey.a.kiryushin@gmail.com>2019-08-21 13:03:31 +0300
commitaf41ab40e1fc4888d1873a9ffe681ddafdfb4ee0 (patch)
tree219315a1ef02ae0d0f21889e7b88e08318b308a2 /test
parent5295ac7f7f26c3a43f0fe9b9c826e876b29cf666 (diff)
Delete trailing whitespace (#42)
Diffstat (limited to 'test')
-rw-r--r--test/Main.hs16
-rw-r--r--test/test-package/test-package.cabal4
2 files changed, 10 insertions, 10 deletions
diff --git a/test/Main.hs b/test/Main.hs
index bfe34cd..d080135 100644
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -106,7 +106,7 @@ packageInfoSpec currentDir = do
Just modInfo -> moduleInfoSpec modInfo
Nothing -> return ()
Left e -> runIO $ putStrLn e >> return ()
-
+
moduleInfoSpec :: ModuleInfo -> Spec
moduleInfoSpec modInfo =
describe "createModuleInfo" $ do
@@ -136,7 +136,7 @@ moduleInfoSpec modInfo =
HCE.source (modInfo :: HCE.ModuleInfo) `shouldBe` sourceCodeLines
it "returns valid map of expressions" $
HCE.exprInfoMap (modInfo :: HCE.ModuleInfo) `shouldBe` testExprInfoMap
-#if MIN_VERSION_GLASGOW_HASKELL(8,2,2,0)
+#if MIN_VERSION_GLASGOW_HASKELL(8,2,2,0)
it "returns valid map of identifiers " $
let removeLocationInfo :: HCE.LocationInfo -> HCE.LocationInfo
removeLocationInfo _ = HCE.UnknownLocation ""
@@ -148,9 +148,9 @@ moduleInfoSpec modInfo =
_ -> extId
cleanup :: HCE.IdentifierInfoMap -> HCE.IdentifierInfoMap
cleanup = U.transformBi removeLocationInfo . U.transformBi removePackageVersionFromExternalId
- in
+ in
cleanup (HCE.idInfoMap (modInfo :: HCE.ModuleInfo)) `shouldBe` cleanup testIdInfoMap
-#endif
+#endif
it "returns valid map of identifier occurrences" $
HCE.idOccMap (modInfo :: HCE.ModuleInfo) `shouldBe` testIdOccMap
@@ -208,7 +208,7 @@ buildAndIndexTestPackage currentDir = do
Nothing ->
return . Left $
"Cannot find stack executable. Stack executable is required to build the test package."
-
+
sourceCodeTransformationSpec :: FilePath -> Spec
sourceCodeTransformationSpec currentDir = do
sourceCodeAfterPreprocessor <-
@@ -258,12 +258,12 @@ sourceCodeTransformationSpec currentDir = do
in fileIndex sourceCodeTransformation `shouldBe` index
describe "fromOriginalLineNumber" $ do
test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File.hs", 1) (Right 1)
- test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File.hs", 4) (Right 4)
+ test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File.hs", 4) (Right 4)
test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File1.hs", 1) (Right 9)
test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File1.hs", 2) (Right 10)
test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File2.hs", 1) (Right 13)
test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File2.hs", 3) (Right 15)
- test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File2.hs", 5) (Right 17)
+ test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File2.hs", 5) (Right 17)
test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File1.hs", 15) (Right 19)
test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File1.hs", 16) (Right 20)
test fromOriginalLineNumber sourceCodeTransformation (HaskellFilePath "File3.hs", 1) (Right 27)
@@ -663,7 +663,7 @@ testIdOccMap =
})
])
]
-
+
testIdInfoMap :: HM.HashMap InternalId IdentifierInfo
testIdInfoMap =
HM.fromList
diff --git a/test/test-package/test-package.cabal b/test/test-package/test-package.cabal
index 30f517d..e845fe5 100644
--- a/test/test-package/test-package.cabal
+++ b/test/test-package/test-package.cabal
@@ -26,8 +26,8 @@ test-suite test-package-test
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs:
- test
+ test
build-depends:
base >=4.7 && <5
- , test-package
+ , test-package
default-language: Haskell2010