Skip to content

Commit 6eb25b5

Browse files
authored
Make a new test folder for variable tests. (#1302)
Variables (and soon, functions) are sort of weird because they can occur at the top level and as statements. It's not clear where they should go. Before this PR, they were in both top_level/ and statement/. This moves them to their own test directory. I'll be doing the same thing for functions too.
1 parent 19f42a9 commit 6eb25b5

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

test/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,15 @@ These tests are all run by `short_format_test.dart`.
6363
The newer tall style tests are:
6464

6565
```
66-
expression/ - Test formatting expressions.
67-
invocation/ - Test formatting function and member invocations.
68-
member/ - Test formatting class/enum/extension/mixin member declarations.
69-
statement/ - Test formatting statements.
70-
top_level/ - Test formatting top-level declarations and directives.
71-
type/ - Test formatting type annotations.
66+
declaration/ - Typedef, class, enum, and extension declarations.
67+
expression/ - Expressions.
68+
invocation/ - Function and member invocations.
69+
member/ - Constructor, method, field, getter, and setter declarations.
70+
selection/ - Test preserving selection information.
71+
statement/ - Statements.
72+
top_level/ - Top-level directives.
73+
type/ - Type annotations.
74+
variable/ - Top-level and local variable declarations.
7275
```
7376

7477
These tests are all run by `tall_format_test.dart`.

test/tall_format_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ void main() async {
1515
await testDirectory('statement', tall: true);
1616
await testDirectory('top_level', tall: true);
1717
await testDirectory('type', tall: true);
18+
await testDirectory('variable', tall: true);
1819

1920
// TODO(tall): The old formatter_test.dart has tests here for things like
2021
// trailing newlines. Port those over to the new style once it supports all
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)