]> Cypherpunks.ru repositories - gostls13.git/commitdiff
go/types, types2: require CGO for TestIssue59944
authorRob Findley <rfindley@google.com>
Tue, 23 May 2023 16:37:13 +0000 (12:37 -0400)
committerRobert Findley <rfindley@google.com>
Tue, 23 May 2023 16:50:45 +0000 (16:50 +0000)
This test is failing on the nocgo builder.

Change-Id: I9426ce77907956e4654fd437ad20e3af664e83ab
Reviewed-on: https://go-review.googlesource.com/c/go/+/497436
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/types2/issues_test.go
src/go/types/issues_test.go

index 6005587645b13d0b18e69a0f0c3f6268c8c9dc81..8bd42a5271517fc9d9159fb30a71e90e72443353 100644 (file)
@@ -11,7 +11,6 @@ import (
        "fmt"
        "internal/testenv"
        "regexp"
-       "runtime"
        "sort"
        "strings"
        "testing"
@@ -807,11 +806,8 @@ func (S) M5(struct {S;t}) {}
 }
 
 func TestIssue59944(t *testing.T) {
-       if runtime.GOARCH == "wasm" {
-               // While we don't use the cgo tool directly in this test, we must have the
-               // syscall package.
-               t.Skip("cgo generated code does not compile on wasm")
-       }
+       testenv.MustHaveCGO(t)
+
        // The typechecker should resolve methods declared on aliases of cgo types.
        const src = `
 package p
index d7f06cd9cbac4042fe7d81da20fc04be06778926..1a784aae213d232d13fed910f4337c741dcf66a0 100644 (file)
@@ -13,7 +13,6 @@ import (
        "go/token"
        "internal/testenv"
        "regexp"
-       "runtime"
        "sort"
        "strings"
        "testing"
@@ -846,11 +845,8 @@ func (S) M5(struct {S;t}) {}
 }
 
 func TestIssue59944(t *testing.T) {
-       if runtime.GOARCH == "wasm" {
-               // While we don't use the cgo tool directly in this test, we must have the
-               // syscall package.
-               t.Skip("cgo generated code does not compile on wasm")
-       }
+       testenv.MustHaveCGO(t)
+
        // The typechecker should resolve methods declared on aliases of cgo types.
        const src = `
 package p