aboutsummaryrefslogtreecommitdiff
path: root/tools/odinfmt/tests
diff options
context:
space:
mode:
authorhenbr <henrik.brandt@protonmail.com>2025-01-19 19:21:38 +0100
committerhenbr <henrik.brandt@protonmail.com>2025-01-19 19:21:38 +0100
commit79b83b2bd90c69acaf13110c2cd6ab76b47c9cba (patch)
tree3a264092cda59be1ebd6186043c6e0dde7601307 /tools/odinfmt/tests
parentd22499ba966d2c2c8bb0cd4aee8ced52b986ed74 (diff)
Fix extra new lines after switch with allman brace style
Diffstat (limited to 'tools/odinfmt/tests')
-rw-r--r--tools/odinfmt/tests/allman/.snapshots/switch.odin17
-rw-r--r--tools/odinfmt/tests/allman/odinfmt.json3
-rw-r--r--tools/odinfmt/tests/allman/switch.odin18
3 files changed, 38 insertions, 0 deletions
diff --git a/tools/odinfmt/tests/allman/.snapshots/switch.odin b/tools/odinfmt/tests/allman/.snapshots/switch.odin
new file mode 100644
index 0000000..9eef4a9
--- /dev/null
+++ b/tools/odinfmt/tests/allman/.snapshots/switch.odin
@@ -0,0 +1,17 @@
+package allman
+
+main :: proc() {
+ num := 1
+
+ switch num {
+ case 0:
+ case 1:
+ }
+
+ switch num {
+ case 0:
+ case 1:
+ }
+
+
+}
diff --git a/tools/odinfmt/tests/allman/odinfmt.json b/tools/odinfmt/tests/allman/odinfmt.json
new file mode 100644
index 0000000..d6ebe98
--- /dev/null
+++ b/tools/odinfmt/tests/allman/odinfmt.json
@@ -0,0 +1,3 @@
+{
+ "brace_style": "Allman"
+}
diff --git a/tools/odinfmt/tests/allman/switch.odin b/tools/odinfmt/tests/allman/switch.odin
new file mode 100644
index 0000000..b68f9bc
--- /dev/null
+++ b/tools/odinfmt/tests/allman/switch.odin
@@ -0,0 +1,18 @@
+package allman
+
+main :: proc() {
+ num := 1
+
+ switch num
+ {
+ case 0:
+ case 1:
+ }
+
+ switch num {
+ case 0:
+ case 1:
+ }
+
+
+} \ No newline at end of file