blob: 7676a26c1259eec0a56ca1a3c2930bc593f86de6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This is a package for testing comment placement by go/printer.
//
package main
// Test cases for idempotent comment formatting (was issue 1835).
/*
c1a
*/
/*
c1b
*/
/* foo
c1c
*/
/* foo
c1d
*/
/*
c1e
foo */
/*
c1f
foo */
func f() {
/*
c2a
*/
/*
c2b
*/
/* foo
c2c
*/
/* foo
c2d
*/
/*
c2e
foo */
/*
c2f
foo */
}
func g() {
/*
c3a
*/
/*
c3b
*/
/* foo
c3c
*/
/* foo
c3d
*/
/*
c3e
foo */
/*
c3f
foo */
}
// Test case taken literally from issue 1835.
func main() {
/*
prints test 5 times
*/
for i := 0; i < 5; i++ {
println("test")
}
}
func issue5623() {
L:
_ = yyyyyyyyyyyyyyyy // comment - should be aligned
_ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx /* comment */
_ = yyyyyyyyyyyyyyyy /* comment - should be aligned */
_ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx // comment
LLLLLLL:
_ = yyyyyyyyyyyyyyyy // comment - should be aligned
_ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx // comment
LL:
LLLLL:
_ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx /* comment */
_ = yyyyyyyyyyyyyyyy /* comment - should be aligned */
_ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx // comment
_ = yyyyyyyyyyyyyyyy // comment - should be aligned
// test case from issue
label:
mask := uint64(1)<<c - 1 // Allocation mask
used := atomic.LoadUint64(&h.used) // Current allocations
}
|