diff options
Diffstat (limited to 'tests/indent')
| -rw-r--r-- | tests/indent/wgsl/basic.wgsl | 17 | ||||
| -rw-r--r-- | tests/indent/wgsl_spec.lua | 7 |
2 files changed, 23 insertions, 1 deletions
diff --git a/tests/indent/wgsl/basic.wgsl b/tests/indent/wgsl/basic.wgsl index 7dd50f87e..ccf29a360 100644 --- a/tests/indent/wgsl/basic.wgsl +++ b/tests/indent/wgsl/basic.wgsl @@ -41,3 +41,20 @@ fn vertex(vertex: Vertex, out.b = 2; return out; } + +fn foo( + a: u32, + b: u32, +) { + return a; +} + +fn bar( +) {} + +fn baz( + a: u32, +) {} + +fn qux( +) diff --git a/tests/indent/wgsl_spec.lua b/tests/indent/wgsl_spec.lua index 55d59acbd..e70215a7b 100644 --- a/tests/indent/wgsl_spec.lua +++ b/tests/indent/wgsl_spec.lua @@ -15,5 +15,10 @@ describe("indent WGSL:", function() }) end) - describe("new line:", function() end) + describe("new line:", function() + run:new_line("basic.wgsl", { on_line = 47, text = "c: u32,", indent = 2 }) + run:new_line("basic.wgsl", { on_line = 52, text = "c: u32,", indent = 2 }) + run:new_line("basic.wgsl", { on_line = 56, text = "c: u32,", indent = 2 }) + run:new_line("basic.wgsl", { on_line = 59, text = "c: u32,", indent = 2 }) + end) end) |
