Skip to content

Commit

Permalink
Make a new test folder for variable tests.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
munificent committed Oct 31, 2023
1 parent 19f42a9 commit 139d6b6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,15 @@ These tests are all run by `short_format_test.dart`.
The newer tall style tests are:

```
expression/ - Test formatting expressions.
invocation/ - Test formatting function and member invocations.
member/ - Test formatting class/enum/extension/mixin member declarations.
statement/ - Test formatting statements.
top_level/ - Test formatting top-level declarations and directives.
type/ - Test formatting type annotations.
declaration/ - Typedef, class, enum, and extension declarations.
expression/ - Expressions.
invocation/ - Function and member invocations.
member/ - Constructor, method, field, getter, and setter declarations.
selection/ - Test preserving selection information.
statement/ - Statements.
top_level/ - Top-level directives.
type/ - Type annotations.
variable/ - Top-level and local variable declarations.
```

These tests are all run by `tall_format_test.dart`.
Expand Down
1 change: 1 addition & 0 deletions test/tall_format_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ void main() async {
await testDirectory('statement', tall: true);
await testDirectory('top_level', tall: true);
await testDirectory('type', tall: true);
await testDirectory('variable', tall: true);

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

0 comments on commit 139d6b6

Please sign in to comment.