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

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

Issue 2788373002: Add Source.getTextLine and use it to display source snippets in error messages. (Closed)
Patch Set: dartfmt Created 3 years, 8 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
Index: tests/compiler/dart2js/warnings_checker.dart
diff --git a/tests/compiler/dart2js/warnings_checker.dart b/tests/compiler/dart2js/warnings_checker.dart
index 8e6d531aff6139c84bdc64239c772fe927b1ffcd..d6009710a8d9d6cd6013ecbb8dc02de48d0fb0e2 100644
--- a/tests/compiler/dart2js/warnings_checker.dart
+++ b/tests/compiler/dart2js/warnings_checker.dart
@@ -59,7 +59,7 @@ void checkWarnings(Map<String, dynamic> tests, [List<String> arguments]) {
}
for (CollectedMessage message in collector.warnings) {
Expect.equals(uri, message.uri);
- int lineNo = file.getLine(message.begin);
+ int lineNo = file.getLocation(message.begin).line - 1;
if (expectedWarnings.containsKey(lineNo)) {
unseenWarnings.remove(lineNo);
} else if (!unexpectedStatus.contains(lineNo + 1)) {
« pkg/kernel/lib/ast.dart ('K') | « tests/compiler/dart2js/sourcemaps/sourcemap_html_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698