mirror of
https://github.com/github/semantic.git
synced 2024-12-29 01:42:43 +03:00
Update tests for new AccessControl / Relation split
This commit is contained in:
parent
12e63cac6d
commit
bf3ff6154a
@ -35,11 +35,11 @@ spec = parallel $ do
|
||||
let lexicalEdges = Map.singleton Lexical [ currentScope' ]
|
||||
x = SpecHelpers.name "x"
|
||||
associatedScope <- newScope lexicalEdges
|
||||
declare (ScopeGraph.Declaration "identity") (Default Public) emptySpan (Just associatedScope)
|
||||
declare (ScopeGraph.Declaration "identity") Default Public emptySpan (Just associatedScope)
|
||||
withScope associatedScope $ do
|
||||
declare (Declaration x) (Default Public) emptySpan Nothing
|
||||
declare (Declaration x) Default Public emptySpan Nothing
|
||||
identity <- function "identity" [ x ]
|
||||
(SpecEff (Heap.lookupDeclaration (ScopeGraph.Declaration (SpecHelpers.name "x")) >>= deref)) associatedScope
|
||||
(SpecEff (Heap.lookupSlot (ScopeGraph.Declaration (SpecHelpers.name "x")) >>= deref)) associatedScope
|
||||
val <- pure (integer 123)
|
||||
call identity [val]
|
||||
expected `shouldBe` Right (integer 123)
|
||||
|
@ -235,7 +235,7 @@ instance Listable1 Declaration.Function where
|
||||
instance Listable1 Declaration.Method where
|
||||
liftTiers tiers = liftCons6 (liftTiers tiers) tiers tiers tiers (liftTiers tiers) tiers Declaration.Method
|
||||
|
||||
instance Listable1 Declaration.Visibility where
|
||||
instance Listable1 Declaration.AccessControl where
|
||||
liftTiers tiers = cons0 Declaration.Unknown \/ cons0 Declaration.Public \/ cons0 Declaration.Protected \/ cons0 Declaration.Private
|
||||
|
||||
instance Listable1 Statement.If where
|
||||
|
@ -188,7 +188,7 @@ lookupDeclaration :: Name -> (Precise, Precise) -> Heap Precise Precise (Value t
|
||||
lookupDeclaration name (currentScope, currentFrame) heap scopeGraph = do
|
||||
path <- ScopeGraph.lookupScopePath name currentScope scopeGraph
|
||||
frameAddress <- Heap.lookupFrameAddress path currentFrame heap
|
||||
toList <$> Heap.getSlot (Slot frameAddress (Heap.pathPosition path)) heap
|
||||
toList <$> Heap.getSlotValue (Slot frameAddress (Heap.pathPosition path)) heap
|
||||
|
||||
newtype Verbatim = Verbatim ByteString
|
||||
deriving (Eq)
|
||||
|
Loading…
Reference in New Issue
Block a user