aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorDmitri Shuralyov <dmitshur@golang.org>2023-10-17 15:07:58 -0400
committerGopher Robot <gobot@golang.org>2023-10-19 23:33:25 +0000
commitb2fd76ab8dd72b9f2135c1e9b15130e6028fc838 (patch)
tree0d37261f11b8c550cd4e3b761798415a1319ee69 /test/codegen
parentff6dd7125e70976063c412d9f52f8b19ee2c08fb (diff)
downloadgo-b2fd76ab8dd72b9f2135c1e9b15130e6028fc838.tar.xz
test: migrate remaining files to go:build syntax
Most of the test cases in the test directory use the new go:build syntax already. Convert the rest. In general, try to place the build constraint line below the test directive comment in more places. For #41184. For #60268. Change-Id: I11c41a0642a8a26dc2eda1406da908645bbc005b Cq-Include-Trybots: luci.golang.try:gotip-linux-386-longtest,gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/536236 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/clobberdead.go2
-rw-r--r--test/codegen/clobberdeadreg.go2
-rw-r--r--test/codegen/retpoline.go3
-rw-r--r--test/codegen/spectre.go3
-rw-r--r--test/codegen/structs.go1
5 files changed, 6 insertions, 5 deletions
diff --git a/test/codegen/clobberdead.go b/test/codegen/clobberdead.go
index 732be5f73b..13d2efbbe5 100644
--- a/test/codegen/clobberdead.go
+++ b/test/codegen/clobberdead.go
@@ -1,6 +1,6 @@
// asmcheck -gcflags=-clobberdead
-// +build amd64 arm64
+//go:build amd64 || arm64
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/codegen/clobberdeadreg.go b/test/codegen/clobberdeadreg.go
index 2a93c410f9..39c4a743cb 100644
--- a/test/codegen/clobberdeadreg.go
+++ b/test/codegen/clobberdeadreg.go
@@ -1,6 +1,6 @@
// asmcheck -gcflags=-clobberdeadreg
-// +build amd64
+//go:build amd64
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/codegen/retpoline.go b/test/codegen/retpoline.go
index a04a005e2e..0e8f661ec9 100644
--- a/test/codegen/retpoline.go
+++ b/test/codegen/retpoline.go
@@ -1,6 +1,7 @@
-// +build amd64
// asmcheck -gcflags=-spectre=ret
+//go:build amd64
+
package codegen
func CallFunc(f func()) {
diff --git a/test/codegen/spectre.go b/test/codegen/spectre.go
index edc8b28028..1b22b77aa6 100644
--- a/test/codegen/spectre.go
+++ b/test/codegen/spectre.go
@@ -1,6 +1,7 @@
-// +build amd64
// asmcheck -gcflags=-spectre=index
+//go:build amd64
+
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/test/codegen/structs.go b/test/codegen/structs.go
index fc49a69375..49a201f743 100644
--- a/test/codegen/structs.go
+++ b/test/codegen/structs.go
@@ -1,7 +1,6 @@
// asmcheck
//go:build !goexperiment.cgocheck2
-// +build !goexperiment.cgocheck2
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style