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

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

Issue 24180004: Source selection API abstraction first cut. (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/formatter_impl.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 27530)
+++ pkg/analyzer_experimental/test/services/formatter_test.dart (working copy)
@@ -767,7 +767,8 @@
test('initialIndent', () {
var formatter = new CodeFormatter(
new FormatterOptions(initialIndentationLevel: 2));
- var formattedSource = formatter.format(CodeKind.STATEMENT, 'var x;');
+ var formattedSource =
+ formatter.format(CodeKind.STATEMENT, 'var x;').source;
expect(formattedSource, startsWith(' '));
});
@@ -955,10 +956,10 @@
}
String formatCU(src, {options: const FormatterOptions()}) =>
- new CodeFormatter(options).format(CodeKind.COMPILATION_UNIT, src);
+ new CodeFormatter(options).format(CodeKind.COMPILATION_UNIT, src).source;
String formatStatement(src, {options: const FormatterOptions()}) =>
- new CodeFormatter(options).format(CodeKind.STATEMENT, src);
+ new CodeFormatter(options).format(CodeKind.STATEMENT, src).source;
Token tokenize(String str) => new StringScanner(null, str, null).tokenize();
« no previous file with comments | « pkg/analyzer_experimental/lib/src/services/formatter_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698