Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Unified Diff: test/formatter_test.dart

Issue 1258203006: Handle function arguments inside function calls. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Reformat self. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pubspec.yaml ('k') | test/regression/0100/0108.unit » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/formatter_test.dart
diff --git a/test/formatter_test.dart b/test/formatter_test.dart
index 859cf6b197ebfeeaad1653e6fb05daa63bedceeb..d2271331b81f1bd7adc759b8986778d5a319da97 100644
--- a/test/formatter_test.dart
+++ b/test/formatter_test.dart
@@ -39,12 +39,14 @@ void main() {
test("FormatterException describes parse errors", () {
try {
- new DartFormatter().format("""
+ new DartFormatter().format(
+ """
var a = some error;
var b = another one;
- """, uri: "my_file.dart");
+ """,
+ uri: "my_file.dart");
fail("Should throw.");
} on FormatterException catch (err) {
@@ -90,7 +92,8 @@ void main() {
test('preserves initial indent', () {
var formatter = new DartFormatter(indent: 3);
expect(
- formatter.formatStatement('if (foo) {bar;}'), equals(' if (foo) {\n'
+ formatter.formatStatement('if (foo) {bar;}'),
+ equals(' if (foo) {\n'
' bar;\n'
' }'));
});
@@ -119,7 +122,8 @@ void main() {
expect(
new DartFormatter(lineEnding: "\r\n").formatStatement(' """first\r\n'
'second\r\n'
- 'third""" ;'), equals('"""first\r\n'
+ 'third""" ;'),
+ equals('"""first\r\n'
'second\r\n'
'third""";'));
});
« no previous file with comments | « pubspec.yaml ('k') | test/regression/0100/0108.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698