mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
Kill verbatim
, since we have more principled golden tests now.
This commit is contained in:
parent
11442cf772
commit
14bbf6856b
@ -10,8 +10,6 @@ module SpecHelpers
|
|||||||
, runTaskOrDie
|
, runTaskOrDie
|
||||||
, TaskSession(..)
|
, TaskSession(..)
|
||||||
, testEvaluating
|
, testEvaluating
|
||||||
, verbatim
|
|
||||||
, Verbatim(..)
|
|
||||||
, toList
|
, toList
|
||||||
, Config
|
, Config
|
||||||
, LogQueue
|
, LogQueue
|
||||||
@ -195,17 +193,3 @@ lookupDeclaration name (currentScope, currentFrame) heap scopeGraph = do
|
|||||||
path <- ScopeGraph.lookupScopePath name currentScope scopeGraph
|
path <- ScopeGraph.lookupScopePath name currentScope scopeGraph
|
||||||
frameAddress <- Heap.lookupFrameAddress path currentFrame heap
|
frameAddress <- Heap.lookupFrameAddress path currentFrame heap
|
||||||
toList <$> Heap.getSlotValue (Slot frameAddress (Heap.pathPosition path)) heap
|
toList <$> Heap.getSlotValue (Slot frameAddress (Heap.pathPosition path)) heap
|
||||||
|
|
||||||
newtype Verbatim = Verbatim ByteString
|
|
||||||
deriving (Eq)
|
|
||||||
|
|
||||||
instance Show Verbatim where
|
|
||||||
showsPrec _ (Verbatim byteString) = (T.unpack (T.decodeUtf8 byteString) ++)
|
|
||||||
|
|
||||||
verbatim :: ByteString -> Verbatim
|
|
||||||
verbatim = Verbatim . stripWhitespace
|
|
||||||
where
|
|
||||||
stripWhitespace :: ByteString -> ByteString
|
|
||||||
stripWhitespace = B.foldl' go B.empty
|
|
||||||
where go acc x | x `B.elem` " \t\n" = acc
|
|
||||||
| otherwise = B.snoc acc x
|
|
||||||
|
Loading…
Reference in New Issue
Block a user