]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: generate errors_test.go from types2 source
authorRobert Griesemer <gri@golang.org>
Fri, 23 Feb 2024 17:55:31 +0000 (09:55 -0800)
committerGopher Robot <gobot@golang.org>
Fri, 23 Feb 2024 21:21:46 +0000 (21:21 +0000)
This CL reduces the amount of code that needs to be maintained
manually by about 50 LOC.

Change-Id: I022688d6db58bf58e7844487582725a23ca820be
Reviewed-on: https://go-review.googlesource.com/c/go/+/566515
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
src/go/types/errors_test.go
src/go/types/generate_test.go

index 5c47ef51e88f39ab2e38ce87bfe8bcac1d8e64ce..b605a580e831e24c3451d0f84c871572eb509c59 100644 (file)
@@ -1,12 +1,12 @@
+// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+
 // 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.
 
 package types
 
-import (
-       "testing"
-)
+import "testing"
 
 func TestError(t *testing.T) {
        var err error_
index 268f389b2420359eb08b4dbc3575fb7f0229bb29..4e0d9bb3a989f02678426c8088cecaa5039598a1 100644 (file)
@@ -117,10 +117,11 @@ var filemap = map[string]action{
                renameIdents(f, "syntax->ast")
        },
        "chan.go":         nil,
-       "const.go":        func(f *ast.File) { fixTokenPos(f) },
+       "const.go":        fixTokenPos,
        "context.go":      nil,
        "context_test.go": nil,
        "conversions.go":  nil,
+       "errors_test.go":  func(f *ast.File) { renameIdents(f, "nopos->noposn") },
        "errsupport.go":   nil,
        "gccgosizes.go":   nil,
        "gcsizes.go":      func(f *ast.File) { renameIdents(f, "IsSyncAtomicAlign64->_IsSyncAtomicAlign64") },