summaryrefslogtreecommitdiff
path: root/lua/tests/indent/c/expr.c
diff options
context:
space:
mode:
authorJędrzej Boczar <yendreij@gmail.com>2021-04-17 22:47:02 +0200
committerKiyan <yazdani.kiyan@protonmail.com>2021-04-23 21:21:38 +0200
commit15f0813b6e0682e3f2c3b611610f6ef67cc87449 (patch)
tree80d795bb93249c432980164dda51f5a5267425cd /lua/tests/indent/c/expr.c
parent77c97d0f8bdc16bdd2a0800fe66bf3ffddfe6ec3 (diff)
tests/indent: add multiple C/C++ tests
Diffstat (limited to 'lua/tests/indent/c/expr.c')
-rw-r--r--lua/tests/indent/c/expr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lua/tests/indent/c/expr.c b/lua/tests/indent/c/expr.c
new file mode 100644
index 00000000..cafb1112
--- /dev/null
+++ b/lua/tests/indent/c/expr.c
@@ -0,0 +1,12 @@
+void foo(int x, int y)
+{
+ if ((x*x - y*y > 0) ||
+ (x == 1 || y == 1) &&
+ (x != 2 && y != 2)
+ ) {
+ return;
+ }
+
+ int z = (x + y) *
+ (x - y);
+}