mirror of
https://github.com/github/semantic.git
synced 2024-11-24 00:42:33 +03:00
RIP Cost
This commit is contained in:
parent
f9c26b3ae4
commit
8c490555ff
@ -98,7 +98,7 @@ testParse path expectedOutput = do
|
||||
expected <- (Verbatim . stripWhitespace) <$> readFile expectedOutput
|
||||
actual `shouldBe` expected
|
||||
|
||||
testDiff :: Renderer (Record '[Cost, Range, Category, SourceSpan]) -> Both FilePath -> FilePath -> Expectation
|
||||
testDiff :: Renderer (Record '[Range, Category, SourceSpan]) -> Both FilePath -> FilePath -> Expectation
|
||||
testDiff renderer paths diff = do
|
||||
sources <- sequence $ readAndTranscodeFile <$> paths
|
||||
diff' <- diffFiles parser renderer (sourceBlobs sources)
|
||||
@ -106,7 +106,7 @@ testDiff renderer paths diff = do
|
||||
expected <- (Verbatim . stripWhitespace) <$> readFile diff
|
||||
actual `shouldBe` expected
|
||||
where
|
||||
parser = parserWithCost (fst paths)
|
||||
parser = parserForFilepath (fst paths)
|
||||
sourceBlobs sources = Source.SourceBlob <$> sources <*> pure mempty <*> paths <*> pure (Just Source.defaultPlainBlob)
|
||||
|
||||
stripWhitespace :: Text -> Text
|
||||
|
Loading…
Reference in New Issue
Block a user