mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/syntax: assume generic code for std lib
Also: improve some error message prints in testSyntaxErrors. Change-Id: Iaa1d642398fa82975fefb4bde54f476dd5229eb5 Reviewed-on: https://go-review.googlesource.com/c/go/+/351791 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
483533df9e
commit
aa878ee49b
2 changed files with 4 additions and 7 deletions
|
|
@ -51,10 +51,7 @@ func TestParseGo2(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestStdLib(t *testing.T) { testStdLib(t, 0) }
|
||||
func TestStdLibGeneric(t *testing.T) { testStdLib(t, AllowGenerics) }
|
||||
|
||||
func testStdLib(t *testing.T, mode Mode) {
|
||||
func TestStdLib(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
|
@ -93,7 +90,7 @@ func testStdLib(t *testing.T, mode Mode) {
|
|||
if debug {
|
||||
fmt.Printf("parsing %s\n", filename)
|
||||
}
|
||||
ast, err := ParseFile(filename, nil, nil, mode)
|
||||
ast, err := ParseFile(filename, nil, nil, AllowGenerics)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue