Skip to content

Commit

Permalink
gopls/internal/analysis/fillreturns: skip test if gotypesalias=1
Browse files Browse the repository at this point in the history
It changes (improves) the behavior of the test; we will reenable
it once the default has changed.

Updates golang/go#65294

Change-Id: I716da405a9f0c03c303c4c0be8b738dd7c5ebdcd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/576137
Reviewed-by: Tim King <taking@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
adonovan authored and gopherbot committed Apr 3, 2024
1 parent c623a28 commit c9b0c65
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gopls/internal/analysis/fillreturns/fillreturns_test.go
Expand Up @@ -5,13 +5,20 @@
package fillreturns_test

import (
"os"
"strings"
"testing"

"golang.org/x/tools/go/analysis/analysistest"
"golang.org/x/tools/gopls/internal/analysis/fillreturns"
)

func Test(t *testing.T) {
// TODO(golang/go#65294): delete once gotypesalias=1 is the default.
if strings.Contains(os.Getenv("GODEBUG"), "gotypesalias=1") {
t.Skip("skipping due to gotypesalias=1, which changes (improves) the result; reenable and update the expectations once it is the default")
}

testdata := analysistest.TestData()
analysistest.RunWithSuggestedFixes(t, testdata, fillreturns.Analyzer, "a", "typeparams")
}

0 comments on commit c9b0c65

Please sign in to comment.