add compound_lit.c test

This commit is contained in:
leo60228 2021-07-31 13:17:14 -04:00 committed by Thomas Vigouroux
parent 1a4b5da758
commit 1dea3928a2
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,10 @@
struct foo {
int x, y;
};
struct foo bar(int x, int y) {
return (struct foo) {
.x = x,
.y = y
};
}

View file

@ -14,6 +14,7 @@ describe("indent C:", function()
describe("new line:", function()
runner:new_line("array.c", { on_line = 2, text = "0,", indent = 4 })
runner:new_line("compound_lit.c", { on_line = 7, text = ".z = 5,", indent = 8 })
runner:new_line("cond.c", { on_line = 3, text = "x++;", indent = 8 })
runner:new_line("cond.c", { on_line = 8, text = "x++;", indent = 8 })
runner:new_line("expr.c", { on_line = 10, text = "2 *", indent = 8 })