1
1
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:
Rob Rix 2018-06-25 11:59:27 -04:00
parent 525f025e73
commit cb4938ef92

View File

@ -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" ]