1 package com.google.checkstyle.test.chapter4formatting.rule412nonemptyblocks;
2
3
4 public class InputFormattedRightCurlySwitchCasesBlocks {
5
6
7 public static void test0() {
8 int mode = 0;
9 switch (mode) {
10 case 1:
11 {
12
13 int x = 1;
14 break;
15 }
16 case 2:
17 {
18
19 int x = 0;
20 break;
21 }
22 default:
23 }
24 }
25
26
27 public static void test() {
28 int mode = 0;
29 switch (mode) {
30 case 1:
31 {
32
33 int x = 1;
34 break;
35 }
36 default:
37 int x = 0;
38 }
39 }
40
41
42 public static void test1() {
43 int k = 0;
44 switch (k) {
45 case 1:
46 {
47
48 int x = 1;
49 }
50 break;
51 case 2:
52 int x = 2;
53 break;
54 default:
55 }
56 }
57
58
59 public static void test2() {
60 int mode = 0;
61 switch (mode) {
62 case 1:
63 int x = 1;
64 break;
65 case 2:
66 {
67
68 break;
69 }
70 default:
71 }
72 }
73
74
75 public static void test3() {
76 int k = 0;
77 switch (k) {
78 case 1:
79 {
80
81 int x = 1;
82 break;
83 }
84 case 2:
85 {
86
87 int x = 2;
88 }
89 break;
90 default:
91 }
92 }
93 }