summaryrefslogtreecommitdiff
path: root/src/pkg/go/printer/testdata/expressions.raw
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2009-12-14 17:35:12 -0800
committerRobert Griesemer <gri@golang.org>2009-12-14 17:35:12 -0800
commitf108863b630a5583d44bab4f981bec2b3a425e1a (patch)
tree05b7ae6958ac579af0fe391c9418b72303864677 /src/pkg/go/printer/testdata/expressions.raw
parentaf296cca7b106191e3bc482f5befe0465fe16871 (diff)
downloadgo-f108863b630a5583d44bab4f981bec2b3a425e1a.tar.gz
improved formatting of import declarations and
multi-line expressions with comments Fixes issue 414. R=rsc http://codereview.appspot.com/179047
Diffstat (limited to 'src/pkg/go/printer/testdata/expressions.raw')
-rw-r--r--src/pkg/go/printer/testdata/expressions.raw12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pkg/go/printer/testdata/expressions.raw b/src/pkg/go/printer/testdata/expressions.raw
index 2c4bb254f..366a639af 100644
--- a/src/pkg/go/printer/testdata/expressions.raw
+++ b/src/pkg/go/printer/testdata/expressions.raw
@@ -297,6 +297,18 @@ const (
)
+// Correct placement of operators and comments in multi-line expressions
+func _() {
+ _ = a + // comment
+ b + // comment
+ c;
+ _ = "a" + // comment
+ "b" + // comment
+ "c";
+ _ = "ba0408" + "7265717569726564"; // field 71, encoding 2, string "required"
+}
+
+
func same(t, u *Time) bool {
// respect source lines in multi-line expressions
return t.Year == u.Year &&