forked from golang/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all: replace build tags in tests with testenv helper
Many tool features, particularly modules-related, require particular Go versions. Build tags are unwieldy, requiring one-off test files which break up test organization. Add a suite of testenv functions that check what Go version is in use. Note that this is the logical Go version, as denoted by the release tags; it should be updated at the beginning of the release cycle per issue golang/go#38704. For ease of reviewing, I'll merge/delete files in a followup CL. Change-Id: Id85ce0f83387b3c45d68465161cf88447325d4f2 Reviewed-on: https://go-review.googlesource.com/c/tools/+/234882 Run-TryBot: Heschi Kreinick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Robert Findley <[email protected]>
- Loading branch information
Showing
15 changed files
with
80 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
// +build go1.14 | ||
|
||
package imports | ||
|
||
import ( | ||
"testing" | ||
|
||
"golang.org/x/tools/internal/testenv" | ||
) | ||
|
||
func TestModVendorAuto_114(t *testing.T) { | ||
testenv.NeedsGo1Point(t, 14) | ||
testModVendorAuto(t, true) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
// +build !go1.14 | ||
|
||
package imports | ||
|
||
import ( | ||
"testing" | ||
|
||
"golang.org/x/tools/internal/testenv" | ||
) | ||
|
||
func TestModVendorAuto_Pre114(t *testing.T) { | ||
testenv.SkipAfterGo1Point(t, 13) | ||
testModVendorAuto(t, false) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.