github.com/varialus/godfly@v0.0.0-20130904042352-1934f9f095ab/src/pkg/go/printer/testdata/comments2.input (about) 1 // Copyright 2012 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // This is a package for testing comment placement by go/printer. 6 // 7 package main 8 9 // Test cases for idempotent comment formatting (was issue 1835). 10 /* 11 c1a 12 */ 13 /* 14 c1b 15 */ 16 /* foo 17 c1c 18 */ 19 /* foo 20 c1d 21 */ 22 /* 23 c1e 24 foo */ 25 /* 26 c1f 27 foo */ 28 29 func f() { 30 /* 31 c2a 32 */ 33 /* 34 c2b 35 */ 36 /* foo 37 c2c 38 */ 39 /* foo 40 c2d 41 */ 42 /* 43 c2e 44 foo */ 45 /* 46 c2f 47 foo */ 48 } 49 50 func g() { 51 /* 52 c3a 53 */ 54 /* 55 c3b 56 */ 57 /* foo 58 c3c 59 */ 60 /* foo 61 c3d 62 */ 63 /* 64 c3e 65 foo */ 66 /* 67 c3f 68 foo */ 69 } 70 71 // Test case taken literally from issue 1835. 72 func main() { 73 /* 74 prints test 5 times 75 */ 76 for i := 0; i < 5; i++ { 77 println("test") 78 } 79 }