mirror of
https://github.com/github/semantic.git
synced 2024-12-29 18:06:14 +03:00
Add all the modules to the Go specs.
This commit is contained in:
parent
525f025e73
commit
cb4938ef92
@ -11,14 +11,14 @@ spec :: Spec
|
||||
spec = parallel $ do
|
||||
describe "Go" $ do
|
||||
it "imports and wildcard imports" $ do
|
||||
((res@(~(Right [(_, env)])), heap), _) <- evaluate ["main.go"]
|
||||
((res@(~(Right [(_, env)])), heap), _) <- evaluate ["main.go", "foo/foo.go", "bar/bar.go", "bar/rab.go"]
|
||||
fmap (() <$) res `shouldBe` Right [()]
|
||||
Env.names env `shouldBe` [ "Bar", "Rab", "foo", "main" ]
|
||||
|
||||
(derefQName heap ("foo" :| []) env >>= deNamespace) `shouldBe` Just ("foo", ["New"])
|
||||
|
||||
it "imports with aliases (and side effects only)" $ do
|
||||
((res@(~(Right [(_, env)])), heap), _) <- evaluate ["main1.go"]
|
||||
((res@(~(Right [(_, env)])), heap), _) <- evaluate ["main1.go", "foo/foo.go", "bar/bar.go", "bar/rab.go"]
|
||||
fmap (() <$) res `shouldBe` Right [()]
|
||||
Env.names env `shouldBe` [ "f", "main" ]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user