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

Unified Diff: pkg/analyzer_experimental/test/services/formatter_test.dart

Issue 23458038: Ensure formatted CUs end with a newline (dartbug.com/13188). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « pkg/analyzer_experimental/lib/src/services/writer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_experimental/test/services/formatter_test.dart
===================================================================
--- pkg/analyzer_experimental/test/services/formatter_test.dart (revision 27350)
+++ pkg/analyzer_experimental/test/services/formatter_test.dart (working copy)
@@ -46,7 +46,7 @@
'class A {\n'
' }',
'class A {\n'
- '}'
+ '}\n'
);
});
@@ -64,7 +64,7 @@
'class A { int meaningOfLife() => 42; }',
'class A {\n'
' int meaningOfLife() => 42;\n'
- '}'
+ '}\n'
);
});
@@ -162,7 +162,7 @@
'library a; class B { }',
'library a;\n'
'class B {\n'
- '}'
+ '}\n'
);
});
@@ -196,7 +196,7 @@
'import "foo";\n\n'
'//Killer class\n'
'class A {\n'
- '}'
+ '}\n'
);
});
@@ -428,7 +428,7 @@
'\n'
'// Comment 2\n'
'\n'
- '/* Comment 3 */'
+ '/* Comment 3 */\n'
);
});
@@ -479,7 +479,7 @@
'class X { //X!\n'
'}',
'class X { //X!\n'
- '}'
+ '}\n'
);
});
@@ -535,7 +535,13 @@
);
});
-
+ test('CU - EOF nl', () {
+ expectCUFormatsTo(
+ 'var x = 1;',
+ 'var x = 1;\n'
+ );
+ });
+
test('CU - constructor', () {
expectCUFormatsTo(
'class A {\n'
« no previous file with comments | « pkg/analyzer_experimental/lib/src/services/writer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698