aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/encoding
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2020-01-09 23:14:57 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2020-01-09 23:14:57 +0000
commitfcee603081c754044e682f9263f526fcefc9442c (patch)
treefd799d5e04409a5f50a3570151d4ef62c558bb09 /libgo/go/encoding
parentacd43917df56f8845b1497d939da97f4e22b5ebb (diff)
downloadgcc-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/encoding')
-rw-r--r--libgo/go/encoding/csv/example_test.go2
-rw-r--r--libgo/go/encoding/hex/example_test.go2
-rw-r--r--libgo/go/encoding/json/example_marshaling_test.go2
-rw-r--r--libgo/go/encoding/json/example_text_marshaling_test.go2
-rw-r--r--libgo/go/encoding/pem/example_test.go2
-rw-r--r--libgo/go/encoding/xml/example_marshaling_test.go2
-rw-r--r--libgo/go/encoding/xml/example_text_marshaling_test.go2
7 files changed, 0 insertions, 14 deletions
diff --git a/libgo/go/encoding/csv/example_test.go b/libgo/go/encoding/csv/example_test.go
index e3c3bd5..dc227d4 100644
--- a/libgo/go/encoding/csv/example_test.go
+++ b/libgo/go/encoding/csv/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 csv_test
import (
diff --git a/libgo/go/encoding/hex/example_test.go b/libgo/go/encoding/hex/example_test.go
index fb1554e..3580757 100644
--- a/libgo/go/encoding/hex/example_test.go
+++ b/libgo/go/encoding/hex/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 hex_test
import (
diff --git a/libgo/go/encoding/json/example_marshaling_test.go b/libgo/go/encoding/json/example_marshaling_test.go
index 1c4f783..7f15c74 100644
--- a/libgo/go/encoding/json/example_marshaling_test.go
+++ b/libgo/go/encoding/json/example_marshaling_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 json_test
import (
diff --git a/libgo/go/encoding/json/example_text_marshaling_test.go b/libgo/go/encoding/json/example_text_marshaling_test.go
index a8a3f83..04c7813 100644
--- a/libgo/go/encoding/json/example_text_marshaling_test.go
+++ b/libgo/go/encoding/json/example_text_marshaling_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 json_test
import (
diff --git a/libgo/go/encoding/pem/example_test.go b/libgo/go/encoding/pem/example_test.go
index 22081b4..806e7bb 100644
--- a/libgo/go/encoding/pem/example_test.go
+++ b/libgo/go/encoding/pem/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 pem_test
import (
diff --git a/libgo/go/encoding/xml/example_marshaling_test.go b/libgo/go/encoding/xml/example_marshaling_test.go
index 04d3470..9f9e801 100644
--- a/libgo/go/encoding/xml/example_marshaling_test.go
+++ b/libgo/go/encoding/xml/example_marshaling_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 xml_test
import (
diff --git a/libgo/go/encoding/xml/example_text_marshaling_test.go b/libgo/go/encoding/xml/example_text_marshaling_test.go
index 8d1f332..2549cb1 100644
--- a/libgo/go/encoding/xml/example_text_marshaling_test.go
+++ b/libgo/go/encoding/xml/example_text_marshaling_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 xml_test
import (