Skip to content

Commit 8a0e3b3

Browse files
cushongoogle-java-format Team
authored and
google-java-format Team
committed
Add a regression test for handling of /// comments
#1153 PiperOrigin-RevId: 673574143
1 parent 9f2611e commit 8a0e3b3

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

core/src/test/java/com/google/googlejavaformat/java/FormatterIntegrationTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ public class FormatterIntegrationTest {
7272
"I981",
7373
"I1020",
7474
"I1037")
75+
// TODO: https://github.com/google/google-java-format/issues/1153
76+
// .putAll(23, "I1153")
7577
.build();
7678

7779
@Parameters(name = "{index}: {0}")
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class I1153 {
2+
void f() {
3+
//// (1) one
4+
int one;
5+
6+
//// (2) two
7+
int two;
8+
9+
//// (2.1) if we need to collect data using multiple different collectors, e.g. taxonomy and
10+
//// ranges, or even two taxonomy facets that use different Category List Field, we can
11+
//// use MultiCollectorManager, e.g.:
12+
// TODO: This should be (2.1) two point one
13+
int twoPointOne;
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class I1153 {
2+
void f() {
3+
//// (1) one
4+
int one;
5+
6+
//// (2) two
7+
int two;
8+
9+
//// (2.1) if we need to collect data using multiple different collectors, e.g. taxonomy and
10+
//// ranges, or even two taxonomy facets that use different Category List Field, we can
11+
//// use MultiCollectorManager, e.g.:
12+
// TODO: This should be (2.1) two point one
13+
int twoPointOne;
14+
}
15+
}

0 commit comments

Comments
 (0)