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

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

Issue 153203002: Indent fix for trailing comments (dartbug.com/16383). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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/test/services/data/stmt_tests.data ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/services/formatter_test.dart
===================================================================
--- pkg/analyzer/test/services/formatter_test.dart (revision 32259)
+++ pkg/analyzer/test/services/formatter_test.dart (working copy)
@@ -1143,18 +1143,18 @@
group('line', () {
test('space', () {
- var line = new Line(indent: 0);
+ var line = new Line(indentLevel: 0);
line.addSpaces(2);
expect(line.toString(), equals(' '));
});
test('initial indent', () {
- var line = new Line(indent: 2);
+ var line = new Line(indentLevel: 2);
expect(line.toString(), equals(' '));
});
test('initial indent (tabbed)', () {
- var line = new Line(indent:1, useTabs: true);
+ var line = new Line(indentLevel:1, useTabs: true);
expect(line.toString(), equals('\t'));
});
@@ -1165,13 +1165,13 @@
});
test('addToken (2)', () {
- var line = new Line(indent: 1);
+ var line = new Line(indentLevel: 1);
line.addToken(new LineToken('foo'));
expect(line.toString(), equals(' foo'));
});
test('isWhitespace', () {
- var line = new Line(indent: 1);
+ var line = new Line(indentLevel: 1);
expect(line.isWhitespace(), isTrue);
});
@@ -1182,15 +1182,15 @@
test('basic print', () {
var writer = new SourceWriter();
- writer.print('foo');
- writer.print(' ');
- writer.print('bar');
+ writer.write('foo');
+ writer.write(' ');
+ writer.write('bar');
expect(writer.toString(), equals('foo bar'));
});
test('newline', () {
var writer = new SourceWriter();
- writer.print('foo');
+ writer.write('foo');
writer.newline();
expect(writer.toString(), equals('foo\n'));
});
@@ -1203,13 +1203,13 @@
test('basic print (with indents)', () {
var writer = new SourceWriter();
- writer.print('foo');
+ writer.write('foo');
writer.indent();
writer.newline();
- writer.print('bar');
+ writer.write('bar');
writer.unindent();
writer.newline();
- writer.print('baz');
+ writer.write('baz');
expect(writer.toString(), equals('foo\n bar\nbaz'));
});
« no previous file with comments | « pkg/analyzer/test/services/data/stmt_tests.data ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698