aboutsummaryrefslogtreecommitdiff
path: root/src/go/parser/short_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/parser/short_test.go')
-rw-r--r--src/go/parser/short_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/go/parser/short_test.go b/src/go/parser/short_test.go
index 3676c27559..b21dd0aa60 100644
--- a/src/go/parser/short_test.go
+++ b/src/go/parser/short_test.go
@@ -64,8 +64,8 @@ var valids = []string{
}
// validWithTParamsOnly holds source code examples that are valid if
-// ParseTypeParams is set, but invalid if not. When checking with the
-// ParseTypeParams set, errors are ignored.
+// parseTypeParams is set, but invalid if not. When checking with the
+// parseTypeParams set, errors are ignored.
var validWithTParamsOnly = []string{
`package p; type _ []T[ /* ERROR "expected ';', found '\['" */ int]`,
`package p; type T[P any /* ERROR "expected ']', found any" */ ] struct { P }`,
@@ -131,10 +131,10 @@ func TestValid(t *testing.T) {
})
t.Run("tparams", func(t *testing.T) {
for _, src := range valids {
- checkErrors(t, src, src, DeclarationErrors|AllErrors|ParseTypeParams, false)
+ checkErrors(t, src, src, DeclarationErrors|AllErrors|parseTypeParams, false)
}
for _, src := range validWithTParamsOnly {
- checkErrors(t, src, src, DeclarationErrors|AllErrors|ParseTypeParams, false)
+ checkErrors(t, src, src, DeclarationErrors|AllErrors|parseTypeParams, false)
}
})
}
@@ -142,7 +142,7 @@ func TestValid(t *testing.T) {
// TestSingle is useful to track down a problem with a single short test program.
func TestSingle(t *testing.T) {
const src = `package p; var _ = T[P]{}`
- checkErrors(t, src, src, DeclarationErrors|AllErrors|ParseTypeParams, true)
+ checkErrors(t, src, src, DeclarationErrors|AllErrors|parseTypeParams, true)
}
var invalids = []string{
@@ -261,10 +261,10 @@ func TestInvalid(t *testing.T) {
})
t.Run("tparams", func(t *testing.T) {
for _, src := range invalids {
- checkErrors(t, src, src, DeclarationErrors|AllErrors|ParseTypeParams, true)
+ checkErrors(t, src, src, DeclarationErrors|AllErrors|parseTypeParams, true)
}
for _, src := range invalidTParamErrs {
- checkErrors(t, src, src, DeclarationErrors|AllErrors|ParseTypeParams, true)
+ checkErrors(t, src, src, DeclarationErrors|AllErrors|parseTypeParams, true)
}
})
}