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