diff options
Diffstat (limited to 'src/pkg/go/printer/testdata')
-rw-r--r-- | src/pkg/go/printer/testdata/statements.golden | 15 | ||||
-rw-r--r-- | src/pkg/go/printer/testdata/statements.input | 13 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/pkg/go/printer/testdata/statements.golden b/src/pkg/go/printer/testdata/statements.golden index 290060269..0e4840441 100644 --- a/src/pkg/go/printer/testdata/statements.golden +++ b/src/pkg/go/printer/testdata/statements.golden @@ -111,6 +111,21 @@ func _() { } +// Formatting of selected select statements. +func _() { + select {} + select { /* this comment should not be tab-aligned because the closing } is on the same line */ + } + select { /* this comment should be tab-aligned */ + } + select { // this comment should be tab-aligned + } + select { + case <-c: + } +} + + // Formatting of for-statement headers. func _() { for { diff --git a/src/pkg/go/printer/testdata/statements.input b/src/pkg/go/printer/testdata/statements.input index 21e61efc4..86a753c5a 100644 --- a/src/pkg/go/printer/testdata/statements.input +++ b/src/pkg/go/printer/testdata/statements.input @@ -91,6 +91,19 @@ func _() { } +// Formatting of selected select statements. +func _() { + select { + } + select { /* this comment should not be tab-aligned because the closing } is on the same line */ } + select { /* this comment should be tab-aligned */ + } + select { // this comment should be tab-aligned + } + select { case <-c: } +} + + // Formatting of for-statement headers. func _() { for{} |