1
0
mirror of https://github.com/golang/go synced 2024-10-01 13:18:33 -06:00
go/internal/lsp/testdata/unimported/x_test.go
Heschi Kreinick 3d14842334 internal/imports: load test exports of package under test
x_tests can access exports from the test variant of the package under
test. Change loadExportsFromFiles to understand that mode, and use it
where appropriate.

I didn't want to come up with a cache key for for the test variant, so
for now we bypass the cache in these situations.

Fixes golang/go#29979.

Change-Id: I9959a08da97bbee64c5bcd56e06f548486693156
Reviewed-on: https://go-review.googlesource.com/c/tools/+/213221
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-01-14 23:54:10 +00:00

10 lines
152 B
Go

package unimported_test
import (
"testing"
)
func TestSomething(t *testing.T) {
_ = unimported.TestExport //@unimported("TestExport", testexport)
}