未验证 提交 4f03ef0b 编写于 作者: A Alessandro Arzilli 提交者: GitHub

proc: fix TestStepIntoWrapperForEmbeddedPointer for Go 1.15.4 (#2223)

上级 fe1db25d
......@@ -155,11 +155,18 @@ func Installed() (GoVersion, bool) {
// or go version) is major.minor or a later version, or a development
// version.
func VersionAfterOrEqual(version string, major, minor int) bool {
return VersionAfterOrEqualRev(version, major, minor, -1)
}
// VersionAfterOrEqualRev checks that version (as returned by runtime.Version()
// or go version) is major.minor or a later version, or a development
// version.
func VersionAfterOrEqualRev(version string, major, minor, rev int) bool {
ver, _ := Parse(version)
if ver.IsDevel() {
return true
}
return ver.AfterOrEqual(GoVersion{major, minor, -1, 0, 0, ""})
return ver.AfterOrEqual(GoVersion{major, minor, rev, 0, 0, ""})
}
const producerVersionPrefix = "Go cmd/compile "
......
......@@ -4804,7 +4804,8 @@ func TestStepIntoWrapperForEmbeddedPointer(t *testing.T) {
{contStepout, 29}})
// same test but with next instead of stepout
if goversion.VersionAfterOrEqual(runtime.Version(), 1, 14) && runtime.GOARCH != "386" {
if goversion.VersionAfterOrEqual(runtime.Version(), 1, 14) && runtime.GOARCH != "386" && !goversion.VersionAfterOrEqualRev(runtime.Version(), 1, 15, 4) {
// Line numbers generated for versions 1.14 through 1.15.3 on any system except linux/386
testseq2(t, "ifaceembcall", "", []seqTest{
{contContinue, 28}, // main.main, the line calling iface.PtrReceiver()
{contStep, 18}, // main.(*A).PtrReceiver
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册