aboutsummaryrefslogtreecommitdiffstats
path: root/lua/tests/indent/c/switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua/tests/indent/c/switch.c')
-rw-r--r--lua/tests/indent/c/switch.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lua/tests/indent/c/switch.c b/lua/tests/indent/c/switch.c
new file mode 100644
index 000000000..4003bdb1d
--- /dev/null
+++ b/lua/tests/indent/c/switch.c
@@ -0,0 +1,16 @@
+void foo(int x) {
+ switch (x) {
+ case 1:
+ x += 1;
+ break;
+ case 2: x += 2;
+ break;
+ case 3: x += 3; break;
+ case 4: {
+ x += 4;
+ break;
+ }
+ default:
+ x = -x;
+ }
+}