Skip to content

Commit 76a0dfa

Browse files
committed
remove accessor tests
1 parent 41c1087 commit 76a0dfa

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

Cabal-tests/tests/ParserTests.hs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import Data.TreeDiff.Instances.Cabal ()
4343
tests :: TestTree
4444
tests = testGroup "parsec tests"
4545
[ regressionTests
46-
, accessorsTests
4746
, warningTests
4847
, errorTests
4948
, ipiTests
@@ -153,40 +152,6 @@ errorTest fp = cabalGoldenTest fp correct $ do
153152
input = "tests" </> "ParserTests" </> "errors" </> fp
154153
correct = replaceExtension input "errors"
155154

156-
-------------------------------------------------------------------------------
157-
-- Merging accessors tests
158-
-------------------------------------------------------------------------------
159-
160-
accessorsTests :: TestTree
161-
accessorsTests = testGroup "accessors"
162-
[
163-
#ifdef MIN_VERSION_tree_diff
164-
accessorsGoldenTestCondLibrary
165-
[ "library-merging.cabal"
166-
]
167-
#endif
168-
]
169-
170-
#ifdef MIN_VERSION_tree_diff
171-
accessorsGoldenTestCondLibrary :: [FilePath] -> TestTree
172-
accessorsGoldenTestCondLibrary = testGroup "condLibrary" . map (accessorsGoldenTest condLibrary)
173-
174-
accessorsGoldenTest
175-
:: ToExpr a
176-
=> (GenericPackageDescription -> a)
177-
-> FilePath -> TestTree
178-
accessorsGoldenTest f fp = ediffGolden goldenTest fp exprFile $ do
179-
contents <- BS.readFile input
180-
let res = withSource (PCabalFile (fp, contents)) $ parseGenericPackageDescription contents
181-
let (_, x) = runParseResult res
182-
case x of
183-
Right gpd -> pure . toExpr $ f gpd
184-
Left (_, errs) -> fail $ unlines $ "ERROR" : map (showPErrorWithSource . fmap renderCabalFileSource) (NE.toList errs)
185-
where
186-
input = "tests" </> "ParserTests" </> "accessors" </> fp
187-
exprFile = replaceExtension input "expr"
188-
#endif
189-
190155
-------------------------------------------------------------------------------
191156
-- Regressions
192157
-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)