-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
56 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'package:dart_format/src/Data/Config.dart'; | ||
import 'package:dart_format/src/Formatter.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
import '../../TestTools/TestTools.dart'; | ||
|
||
void main() | ||
{ | ||
TestTools.init(); | ||
|
||
final Config config = Config.experimental(); | ||
final Formatter formatter = Formatter(config); | ||
|
||
group('Playground 14', () | ||
{ | ||
test('format: void f() { for(int i=0;i<10;i++); }', () | ||
{ | ||
const String inputText = 'void f() { for(int i=0;i<10;i++); }'; | ||
const String expectedText = | ||
'void f()\n' | ||
'{\n' | ||
' for (int i = 0; i < 10; i++);\n' | ||
'}\n'; | ||
|
||
final String actualText = formatter.format(inputText); | ||
|
||
TestTools.expect(actualText, equals(expectedText)); | ||
} | ||
); | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters