summaryrefslogtreecommitdiff
path: root/src/pkg/go/printer/testdata/comments.golden
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2009-09-17 09:12:14 -0700
committerRobert Griesemer <gri@golang.org>2009-09-17 09:12:14 -0700
commit3f4f89ac9bb7300c41b6c66e0d4fd0c9fabce9e8 (patch)
tree5fd5961dc984f7d9bae1468624542083f719fda3 /src/pkg/go/printer/testdata/comments.golden
parentf82c63b0e7d765d3d8bbfa7e4f950e60d98b08c0 (diff)
downloadgolang-3f4f89ac9bb7300c41b6c66e0d4fd0c9fabce9e8.tar.gz
- don't add "..." anonymous field to structs/interfaces if entries are stripped
- don't print any optional semicolons after declarations inside functions - indicate non-exported fields/methods in exported types with a comment so that the "exported source" is legal Go code - more tests R=rsc DELTA=300 (227 added, 25 deleted, 48 changed) OCL=34697 CL=34730
Diffstat (limited to 'src/pkg/go/printer/testdata/comments.golden')
-rw-r--r--src/pkg/go/printer/testdata/comments.golden44
1 files changed, 41 insertions, 3 deletions
diff --git a/src/pkg/go/printer/testdata/comments.golden b/src/pkg/go/printer/testdata/comments.golden
index 877a7357a..af11771af 100644
--- a/src/pkg/go/printer/testdata/comments.golden
+++ b/src/pkg/go/printer/testdata/comments.golden
@@ -15,9 +15,47 @@ const (
)
-// The T type.
-type T struct {
- a, b, c int; // 3 fields
+// The SZ struct; it is empty.
+type SZ struct{}
+
+// The S0 struct; no field is exported.
+type S0 struct {
+ int;
+ x, y, z int; // 3 unexported fields
+}
+
+// The S1 struct; some fields are not exported.
+type S1 struct {
+ S0;
+ A, B, C float; // 3 exported fields
+ D, b, c int; // 2 unexported fields
+}
+
+// The S2 struct; all fields are exported.
+type S2 struct {
+ S1;
+ A, B, C float; // 3 exported fields
+}
+
+// The IZ interface; it is empty.
+type SZ interface{}
+
+// The I0 interface; no method is exported.
+type I0 interface {
+ f, g (x int) int; // 2 unexported methods
+}
+
+// The I1 interface; some methods are not exported.
+type I1 interface {
+ I0;
+ F, G (x float) float; // 2 exported methods
+ H, g (x int) int; // 1 unexported method
+}
+
+// The I2 interface; all methods are exported.
+type I1 interface {
+ I0;
+ F, G (x float) float; // 2 exported methods
}
// This comment group should be separated