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.
5 // This is a package for testing comment placement by go/printer.
9 // Test cases for idempotent comment formatting (was issue 1835).
71 // Test case taken literally from issue 1835.
76 for i := 0; i < 5; i++ {
83 _ = yyyyyyyyyyyyyyyy // comment - should be aligned
84 _ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx /* comment */
86 _ = yyyyyyyyyyyyyyyy /* comment - should be aligned */
87 _ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx // comment
90 _ = yyyyyyyyyyyyyyyy // comment - should be aligned
91 _ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx // comment
95 _ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx /* comment */
96 _ = yyyyyyyyyyyyyyyy /* comment - should be aligned */
98 _ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx // comment
99 _ = yyyyyyyyyyyyyyyy // comment - should be aligned
101 // test case from issue
103 mask := uint64(1)<<c - 1 // Allocation mask
104 used := atomic.LoadUint64(&h.used) // Current allocations