go/printer: add missing test files

Change-Id: If5522bcf0f75a86b7aa36ed853a1349ad4a2a1f4
This commit is contained in:
Robert Griesemer 2020-01-14 15:51:27 -08:00
parent ee164bc407
commit 2ebcbd9efd
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,23 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package contracts
contract _(){}
contract _(A, B, C){}
contract (
C0(){}
C1(T){}
C2(A, B, C){}
)
contract _(T){T m()}
type _(type T) struct{}
type _(type A C) struct{}
type _(type A, B, C C) struct{}
func _(type T)() {}
func _(type A C)() {}
func _(type A, B, C C)() {}

25
src/go/printer/testdata/contracts.input vendored Normal file
View File

@ -0,0 +1,25 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package contracts
contract _ (){}
contract _ (A, B, C){}
contract(
C0 (){}
C1 (T){}
C2 (A, B, C){}
)
contract _(T) {
T m()
}
type _(type T) struct{}
type _(type A C) struct{}
type _(type A, B, C C) struct{}
func _(type T)() {}
func _(type A C)() {}
func _(type A, B, C C)() {}