mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 01:40:02 -04:00
fix(dart_indent): Fix dart case/default indent
add tests add tests for fallthrough case add more tests keep functional tests
This commit is contained in:
parent
ba6c55b203
commit
36d4deb294
3 changed files with 49 additions and 2 deletions
30
tests/indent/dart/switch.dart
Normal file
30
tests/indent/dart/switch.dart
Normal file
|
|
@ -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:
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue