1
0
mirror of https://github.com/golang/go synced 2024-11-26 02:17:58 -07:00

misc/cgo/errors: fix TestPointerChecks when GO111MODULE=on

Change-Id: I4e9e46f03c9c43df1d0c6995f3baedd2e1a04c6a
Reviewed-on: https://go-review.googlesource.com/c/go/+/183985
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
Bryan C. Mills 2019-06-26 15:25:16 -04:00
parent ab94ebbdcd
commit 9acd2d60e7

View File

@ -466,6 +466,9 @@ func buildPtrTests(t *testing.T) (dir, exe string) {
if err := os.MkdirAll(src, 0777); err != nil {
t.Fatal(err)
}
if err := ioutil.WriteFile(filepath.Join(src, "go.mod"), []byte("module ptrtest"), 0666); err != nil {
t.Fatal(err)
}
// Prepare two cgo inputs: one for standard cgo and one for //export cgo.
// (The latter cannot have C definitions, only declarations.)