diff options
| author | Pham Huy Hoang <hoangtun0810@gmail.com> | 2023-04-13 01:42:53 +0900 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2023-04-14 02:28:42 -0700 |
| commit | 36d4deb294fb0cd4385d58d8c9f603975bf355ad (patch) | |
| tree | ae2ea4eb88fb81cbee4c9624b47de164ca9dfd41 /tests/indent/dart | |
| parent | chore(dart): remove tests for switch (diff) | |
| download | nvim-treesitter-36d4deb294fb0cd4385d58d8c9f603975bf355ad.tar nvim-treesitter-36d4deb294fb0cd4385d58d8c9f603975bf355ad.tar.gz nvim-treesitter-36d4deb294fb0cd4385d58d8c9f603975bf355ad.tar.bz2 nvim-treesitter-36d4deb294fb0cd4385d58d8c9f603975bf355ad.tar.lz nvim-treesitter-36d4deb294fb0cd4385d58d8c9f603975bf355ad.tar.xz nvim-treesitter-36d4deb294fb0cd4385d58d8c9f603975bf355ad.tar.zst nvim-treesitter-36d4deb294fb0cd4385d58d8c9f603975bf355ad.zip | |
fix(dart_indent): Fix dart case/default indent
add tests
add tests for fallthrough case
add more tests
keep functional tests
Diffstat (limited to 'tests/indent/dart')
| -rw-r--r-- | tests/indent/dart/switch.dart | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/indent/dart/switch.dart b/tests/indent/dart/switch.dart new file mode 100644 index 000000000..489c7b22a --- /dev/null +++ b/tests/indent/dart/switch.dart @@ -0,0 +1,30 @@ +void test() { + switch(a) { + case 1: + } +} + +void test() { + switch(a) { + default: + } +} + +void test_break_dedent() { + switch(x) { + case 1: + break; + } + switch(y) { + case 2: + return; + } +} + + +void test_multi_case() { + switch(x) { + case 1: + case 2: + } +} |
