diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2020-01-09 23:14:57 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2020-01-09 23:14:57 +0000 |
commit | fcee603081c754044e682f9263f526fcefc9442c (patch) | |
tree | fd799d5e04409a5f50a3570151d4ef62c558bb09 /libgo/go/io | |
parent | acd43917df56f8845b1497d939da97f4e22b5ebb (diff) | |
download | gcc-fcee603081c754044e682f9263f526fcefc9442c.zip gcc-fcee603081c754044e682f9263f526fcefc9442c.tar.gz gcc-fcee603081c754044e682f9263f526fcefc9442c.tar.bz2 |
libgo: compile examples in _test packages
Previously if the only names defined by _test packages were examples,
the gotest script would emit an incorrect _testmain.go file.
I worked around that by marking the example_test.go files +build ignored.
This CL changes the gotest script to handle this case correctly,
and removes the now-unnecessary build tags.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214039
From-SVN: r280085
Diffstat (limited to 'libgo/go/io')
-rw-r--r-- | libgo/go/io/ioutil/example_test.go | 2 | ||||
-rw-r--r-- | libgo/go/io/ioutil/testdata/hello | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/libgo/go/io/ioutil/example_test.go b/libgo/go/io/ioutil/example_test.go index 3066c94..a7d340b 100644 --- a/libgo/go/io/ioutil/example_test.go +++ b/libgo/go/io/ioutil/example_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build ignore - package ioutil_test import ( diff --git a/libgo/go/io/ioutil/testdata/hello b/libgo/go/io/ioutil/testdata/hello new file mode 100644 index 0000000..e47c092 --- /dev/null +++ b/libgo/go/io/ioutil/testdata/hello @@ -0,0 +1 @@ +Hello, Gophers! |