summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2016-07-03 16:20:49 +0200
committerJasper Van der Jeugt <m@jaspervdj.be>2016-07-03 18:15:57 +0200
commit53664d22b83d96a3faa0053d8e73b8ca20b5afef (patch)
tree33a6dc920c8f1a7a9e9ba0ade66bff07575a2447 /tests
parentf2f6c3e9636e7a03d2b5f81b9afa1453e8a0976e (diff)
downloadstylish-haskell-53664d22b83d96a3faa0053d8e73b8ca20b5afef.tar.gz
Simple alignment for top-level cases
Diffstat (limited to 'tests')
-rw-r--r--tests/Language/Haskell/Stylish/Step/Cases/Tests.hs32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/Language/Haskell/Stylish/Step/Cases/Tests.hs b/tests/Language/Haskell/Stylish/Step/Cases/Tests.hs
index cab671e..6a104f8 100644
--- a/tests/Language/Haskell/Stylish/Step/Cases/Tests.hs
+++ b/tests/Language/Haskell/Stylish/Step/Cases/Tests.hs
@@ -19,6 +19,8 @@ import Language.Haskell.Stylish.Tests.Util
tests :: Test
tests = testGroup "Language.Haskell.Stylish.Step.Records.Tests"
[ testCase "case 01" case01
+ , testCase "case 02" case02
+ , testCase "case 03" case03
]
@@ -37,3 +39,33 @@ case01 = expected @=? testStep (step 80) input
, " Left _ -> Nothing"
, " Right x -> Just x"
]
+
+
+--------------------------------------------------------------------------------
+case02 :: Assertion
+case02 = expected @=? testStep (step 80) input
+ where
+ input = unlines
+ [ "eitherToMaybe (Left _) = Nothing"
+ , "eitherToMaybe (Right x) = Just x"
+ ]
+
+ expected = unlines
+ [ "eitherToMaybe (Left _) = Nothing"
+ , "eitherToMaybe (Right x) = Just x"
+ ]
+
+
+--------------------------------------------------------------------------------
+case03 :: Assertion
+case03 = expected @=? testStep (step 80) input
+ where
+ input = unlines
+ [ "heady def [] = def"
+ , "heady _ (x : _) = x"
+ ]
+
+ expected = unlines
+ [ "heady def [] = def"
+ , "heady _ (x : _) = x"
+ ]