diff options
| author | Jędrzej Boczar <yendreij@gmail.com> | 2021-04-22 20:53:30 +0200 |
|---|---|---|
| committer | Kiyan <yazdani.kiyan@protonmail.com> | 2021-04-23 21:21:38 +0200 |
| commit | 63a88c873f3643aad9208488765dc53618edd40e (patch) | |
| tree | fb233a54b0dae8a6af1a12dfecb9cd85cbdb4f64 /lua/tests/indent/c | |
| parent | d4e8d3e6597578c14dd846762c57308f36ccacb5 (diff) | |
move all tests to top-level tests/ directory
Diffstat (limited to 'lua/tests/indent/c')
| -rw-r--r-- | lua/tests/indent/c/array.c | 14 | ||||
| -rw-r--r-- | lua/tests/indent/c/comment.c | 8 | ||||
| -rw-r--r-- | lua/tests/indent/c/cond.c | 10 | ||||
| -rw-r--r-- | lua/tests/indent/c/enum.c | 5 | ||||
| -rw-r--r-- | lua/tests/indent/c/expr.c | 12 | ||||
| -rw-r--r-- | lua/tests/indent/c/func.c | 33 | ||||
| -rw-r--r-- | lua/tests/indent/c/label.c | 7 | ||||
| -rw-r--r-- | lua/tests/indent/c/loop.c | 16 | ||||
| -rw-r--r-- | lua/tests/indent/c/no_braces.c | 12 | ||||
| -rw-r--r-- | lua/tests/indent/c/preproc_cond.c | 10 | ||||
| -rw-r--r-- | lua/tests/indent/c/preproc_func.c | 9 | ||||
| -rw-r--r-- | lua/tests/indent/c/string.c | 5 | ||||
| -rw-r--r-- | lua/tests/indent/c/struct.c | 11 | ||||
| -rw-r--r-- | lua/tests/indent/c/switch.c | 16 | ||||
| -rw-r--r-- | lua/tests/indent/c/ternary.c | 6 |
15 files changed, 0 insertions, 174 deletions
diff --git a/lua/tests/indent/c/array.c b/lua/tests/indent/c/array.c deleted file mode 100644 index 5bb67c2c..00000000 --- a/lua/tests/indent/c/array.c +++ /dev/null @@ -1,14 +0,0 @@ -int x[] = { - 1, 2, 3, - 4, 5, - 6 -}; - -int y[][2] = { - {0, 1}, - {1, 2}, - { - 2, - 3 - }, -}; diff --git a/lua/tests/indent/c/comment.c b/lua/tests/indent/c/comment.c deleted file mode 100644 index b32de821..00000000 --- a/lua/tests/indent/c/comment.c +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Function foo - * @param[out] x output - * @param[in] x input - */ -void foo(int *x, int y) { - *x = y; -} diff --git a/lua/tests/indent/c/cond.c b/lua/tests/indent/c/cond.c deleted file mode 100644 index 1ecb22d9..00000000 --- a/lua/tests/indent/c/cond.c +++ /dev/null @@ -1,10 +0,0 @@ -void foo(int x) -{ - if (x > 10) { - return; - } else if (x < -10) { - x = -10; - } else { - x = -x; - } -} diff --git a/lua/tests/indent/c/enum.c b/lua/tests/indent/c/enum.c deleted file mode 100644 index bb6b0dc3..00000000 --- a/lua/tests/indent/c/enum.c +++ /dev/null @@ -1,5 +0,0 @@ -enum foo { - A = 1, - B, - C, -}; diff --git a/lua/tests/indent/c/expr.c b/lua/tests/indent/c/expr.c deleted file mode 100644 index cafb1112..00000000 --- a/lua/tests/indent/c/expr.c +++ /dev/null @@ -1,12 +0,0 @@ -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); -} diff --git a/lua/tests/indent/c/func.c b/lua/tests/indent/c/func.c deleted file mode 100644 index c188acc0..00000000 --- a/lua/tests/indent/c/func.c +++ /dev/null @@ -1,33 +0,0 @@ -int f1(int x) { - return 1; -} - -int f2(int x) -{ - return 1; -} - -int f3( - int x -) { - return 1; -} - -int f4( - int x, - int y -) { - return 1; -} - -int f5(int x, - int y) -{ - return 1; -} - -int -f6(int x, int y) -{ - return 1; -} diff --git a/lua/tests/indent/c/label.c b/lua/tests/indent/c/label.c deleted file mode 100644 index 36b40e23..00000000 --- a/lua/tests/indent/c/label.c +++ /dev/null @@ -1,7 +0,0 @@ -int foo(int x) -{ - goto error; - return 0; -error: - return 1; -} diff --git a/lua/tests/indent/c/loop.c b/lua/tests/indent/c/loop.c deleted file mode 100644 index facaebb6..00000000 --- a/lua/tests/indent/c/loop.c +++ /dev/null @@ -1,16 +0,0 @@ -void foo(int x) -{ - while (x > 0) { - x--; - continue; - } - - for (int i = 0; i < 5; ++i) { - x++; - break; - } - - do { - x++; - } while (x < 0); -} diff --git a/lua/tests/indent/c/no_braces.c b/lua/tests/indent/c/no_braces.c deleted file mode 100644 index 544ac01d..00000000 --- a/lua/tests/indent/c/no_braces.c +++ /dev/null @@ -1,12 +0,0 @@ -int foo(int x) { - if (x > 10) - return 10; - else - return x; - - while (1) - x++; - - for (int i = 0; i < 3; ++i) - x--; -} diff --git a/lua/tests/indent/c/preproc_cond.c b/lua/tests/indent/c/preproc_cond.c deleted file mode 100644 index b85440aa..00000000 --- a/lua/tests/indent/c/preproc_cond.c +++ /dev/null @@ -1,10 +0,0 @@ -void foo(int x) -{ - x = x + 1; -#if 1 - x = x + 2; -#else - x = x + 3; -#endif - x = x + 4; -} diff --git a/lua/tests/indent/c/preproc_func.c b/lua/tests/indent/c/preproc_func.c deleted file mode 100644 index f1f38feb..00000000 --- a/lua/tests/indent/c/preproc_func.c +++ /dev/null @@ -1,9 +0,0 @@ -#define FOO(x) do { \ - x = x + 1; \ - x = x / 2; \ - } while (x > 0); - -void foo(int x) -{ - FOO(x); -} diff --git a/lua/tests/indent/c/string.c b/lua/tests/indent/c/string.c deleted file mode 100644 index 2d5177e0..00000000 --- a/lua/tests/indent/c/string.c +++ /dev/null @@ -1,5 +0,0 @@ -const char *a = "hello \ -world"; - -const char *b = "hello " - "world"; diff --git a/lua/tests/indent/c/struct.c b/lua/tests/indent/c/struct.c deleted file mode 100644 index 8cc2b6b2..00000000 --- a/lua/tests/indent/c/struct.c +++ /dev/null @@ -1,11 +0,0 @@ -struct foo { - int a; - struct bar { - int x; - } b; -}; - -union baz { - struct foo; - int x; -}; diff --git a/lua/tests/indent/c/switch.c b/lua/tests/indent/c/switch.c deleted file mode 100644 index 4003bdb1..00000000 --- a/lua/tests/indent/c/switch.c +++ /dev/null @@ -1,16 +0,0 @@ -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; - } -} diff --git a/lua/tests/indent/c/ternary.c b/lua/tests/indent/c/ternary.c deleted file mode 100644 index 2e40b382..00000000 --- a/lua/tests/indent/c/ternary.c +++ /dev/null @@ -1,6 +0,0 @@ -void foo(int x) -{ - int y = (x > 10) ? 10 - : (x < -10) ? -10 - : x; -} |
