aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/testdata
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-04-30 10:47:24 -0700
committerRobert Griesemer <gri@golang.org>2021-05-05 15:54:39 +0000
commit69368cece5a50056fbfc58010dd6e6ec585611e1 (patch)
treee4d45e5b3611ed9600eaa2ae40a144097f665af2 /src/cmd/compile/internal/types2/testdata
parent3b304ce7fe35b9d1e8cf0b0518ed2550c361a010 (diff)
downloadgo-69368cece5a50056fbfc58010dd6e6ec585611e1.tar.gz
go-69368cece5a50056fbfc58010dd6e6ec585611e1.zip
cmd/compile/internal/types2: make TestManual work for directories
If no source argument is provided, test testdata/manual.go2 instead. Remove testdata/check/tmp/go2 in favor of testdata/manual.go2. These changes affect testing only. Change-Id: I49aba4d8fc4cc5964911e38c55b4c5d013710aeb Reviewed-on: https://go-review.googlesource.com/c/go/+/315769 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/testdata')
-rw-r--r--src/cmd/compile/internal/types2/testdata/check/tmp.go217
-rw-r--r--src/cmd/compile/internal/types2/testdata/manual.go28
2 files changed, 8 insertions, 17 deletions
diff --git a/src/cmd/compile/internal/types2/testdata/check/tmp.go2 b/src/cmd/compile/internal/types2/testdata/check/tmp.go2
deleted file mode 100644
index dae78caff8..0000000000
--- a/src/cmd/compile/internal/types2/testdata/check/tmp.go2
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.
-
-// This file is meant as "dumping ground" for debugging code.
-
-package p
-
-// fun test case
-type C[P interface{m()}] P
-
-func (r C[P]) m() { r.m() }
-
-func f[T interface{m(); n()}](x T) {
- y := C[T](x)
- y.m()
-}
diff --git a/src/cmd/compile/internal/types2/testdata/manual.go2 b/src/cmd/compile/internal/types2/testdata/manual.go2
new file mode 100644
index 0000000000..efe13cf8bc
--- /dev/null
+++ b/src/cmd/compile/internal/types2/testdata/manual.go2
@@ -0,0 +1,8 @@
+// Copyright 2021 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.
+
+// This file is tested when running "go test -run Manual"
+// without source arguments. Use for one-off debugging.
+
+package p