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

Unified Diff: tests/compiler/dart2js/line_column_provider_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 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 | « tests/compiler/dart2js/library_env_test.dart ('k') | tests/compiler/dart2js/link_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/line_column_provider_test.dart
diff --git a/tests/compiler/dart2js/line_column_provider_test.dart b/tests/compiler/dart2js/line_column_provider_test.dart
index ae90daf28a259f4bfa83d9cd801891fe66042afe..bb640e34c45023434e0852a3f9c6845760865dcd 100644
--- a/tests/compiler/dart2js/line_column_provider_test.dart
+++ b/tests/compiler/dart2js/line_column_provider_test.dart
@@ -25,19 +25,24 @@ test(List events, Map<int, List<int>> expectedPositions) {
expectedPositions.forEach((int offset, List<int> expectedPosition) {
if (expectedPosition == null) {
- Expect.throws(() => lineColumnProvider.getLine(offset),
- (e) => true,
- 'Expected out-of-bounds offset: $offset\n'
- 'text:"""${sink.text}"""\n'
- 'lineColumnProvider:$lineColumnProvider');
+ Expect.throws(
+ () => lineColumnProvider.getLine(offset),
+ (e) => true,
+ 'Expected out-of-bounds offset: $offset\n'
+ 'text:"""${sink.text}"""\n'
+ 'lineColumnProvider:$lineColumnProvider');
} else {
int line = lineColumnProvider.getLine(offset);
int column = lineColumnProvider.getColumn(line, offset);
- Expect.equals(expectedPosition[0], line,
+ Expect.equals(
+ expectedPosition[0],
+ line,
'Unexpected result: $offset -> $expectedPosition = [$line,$column]\n'
'text:"""${sink.text}"""\n'
'lineColumnProvider:$lineColumnProvider');
- Expect.equals(expectedPosition[1], column,
+ Expect.equals(
+ expectedPosition[1],
+ column,
'Unexpected result: $offset -> $expectedPosition = [$line,$column]\n'
'text:"""${sink.text}"""\n'
'lineColumnProvider:$lineColumnProvider');
@@ -46,19 +51,39 @@ test(List events, Map<int, List<int>> expectedPositions) {
}
main() {
- test([""], {0: [0, 0], 1: null});
+ test([
+ ""
+ ], {
+ 0: [0, 0],
+ 1: null
+ });
- test([" "], {0: [0, 0], 1: [0, 1], 2: null});
+ test([
+ " "
+ ], {
+ 0: [0, 0],
+ 1: [0, 1],
+ 2: null
+ });
- test(["\n "], {0: [0, 0], 1: [1, 0], 2: [1, 1], 3: null});
+ test([
+ "\n "
+ ], {
+ 0: [0, 0],
+ 1: [1, 0],
+ 2: [1, 1],
+ 3: null
+ });
- Map positions = {0: [0, 0],
- 1: [0, 1],
- 2: [1, 0],
- 3: [1, 1],
- 4: [2, 0],
- 5: [2, 1],
- 6: null};
+ Map positions = {
+ 0: [0, 0],
+ 1: [0, 1],
+ 2: [1, 0],
+ 3: [1, 1],
+ 4: [2, 0],
+ 5: [2, 1],
+ 6: null
+ };
test(["a\nb\nc"], positions);
« no previous file with comments | « tests/compiler/dart2js/library_env_test.dart ('k') | tests/compiler/dart2js/link_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698