]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.16] go/internal/gccgoimporter: fix up gccgo installation test
authorThan McIntosh <thanm@google.com>
Fri, 19 Feb 2021 15:34:55 +0000 (10:34 -0500)
committerIan Lance Taylor <iant@golang.org>
Wed, 11 Aug 2021 16:14:09 +0000 (16:14 +0000)
Change the TestInstallationImporter testpoint to query type
information for sort.Search instead of sort.Ints. The latter function
changed recently (1.16 timeframe), parameter "a" is now "x". A better
candidate for this sort of query is sort.Search, which has been stable
for a while.

Fixes #47610.

Change-Id: I314476eac0b0802f86f5cbce32195cab2926db83
Reviewed-on: https://go-review.googlesource.com/c/go/+/294290
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 0f66fb7b856b02497cf801ce72d80f375f53358b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/340952

src/go/internal/gccgoimporter/gccgoinstallation_test.go

index b332babc7b685cfd35c474b5db7f34dc3dc14357..df0188ace7f70e82bc76c0a4730baa4ed698b9f0 100644 (file)
@@ -184,7 +184,7 @@ func TestInstallationImporter(t *testing.T) {
                {pkgpath: "io", name: "ReadWriter", want: "type ReadWriter interface{Reader; Writer}"},
                {pkgpath: "math", name: "Pi", want: "const Pi untyped float"},
                {pkgpath: "math", name: "Sin", want: "func Sin(x float64) float64"},
-               {pkgpath: "sort", name: "Ints", want: "func Ints(a []int)"},
+               {pkgpath: "sort", name: "Search", want: "func Search(n int, f func(int) bool) int"},
                {pkgpath: "unsafe", name: "Pointer", want: "type Pointer"},
        } {
                runImporterTest(t, imp, nil, &test)