mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Merge branch 'indexer-prototype' of https://github.com/github/semantic into indexer-prototype
This commit is contained in:
commit
52afa47ca3
@ -35,9 +35,9 @@ spec = parallel $ do
|
||||
let lexicalEdges = Map.singleton Lexical [ currentScope' ]
|
||||
x = SpecHelpers.name "x"
|
||||
associatedScope <- newScope lexicalEdges
|
||||
declare (ScopeGraph.Declaration "identity") Default emptySpan (Just associatedScope)
|
||||
declare (ScopeGraph.Declaration "identity") Default emptySpan ScopeGraph.Unknown (Just associatedScope)
|
||||
withScope associatedScope $ do
|
||||
declare (Declaration x) Default emptySpan Nothing
|
||||
declare (Declaration x) Default emptySpan ScopeGraph.Unknown Nothing
|
||||
identity <- function "identity" [ x ]
|
||||
(SpecEff (Heap.lookupDeclaration (ScopeGraph.Declaration (SpecHelpers.name "x")) >>= deref)) associatedScope
|
||||
val <- pure (integer 123)
|
||||
|
@ -19,11 +19,9 @@ spec :: Spec
|
||||
spec =
|
||||
describe "RepositoryPush protobuf serialization" $
|
||||
it "should round-trip correctly" $ do
|
||||
(Right decoded) <- fromByteString @Envelope sampleEnvelope
|
||||
let (Right decoded) = fromByteString @Envelope sampleEnvelope
|
||||
envelopeId decoded `shouldBe` "f1ef901a-ca31-4d6b-aff1-a5ea1e2a940e"
|
||||
(Right message) <- fromByteString @RepositoryPush (envelopeMessage decoded)
|
||||
let (Right message) = fromByteString @RepositoryPush (envelopeMessage decoded)
|
||||
let (Present mona) = pushActor message
|
||||
userLogin mona `shouldBe` "monalisa"
|
||||
toByteString decoded `shouldBe` sampleEnvelope
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user