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

Unified Diff: pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart

Issue 2977013002: Report messages instead of just printing. (Closed)
Patch Set: Update expectations. Created 3 years, 5 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: pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
diff --git a/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart b/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
index 3e79c0f86d40bb6b93e5f99a04bfe87519b9987d..70e6544bfe59a3ea06f801b09604590acb2e877c 100644
--- a/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
+++ b/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
@@ -6,9 +6,11 @@ import 'dart:convert';
import 'dart:io';
import 'package:front_end/src/base/instrumentation.dart';
+import 'package:front_end/src/fasta/compiler_context.dart' show CompilerContext;
import 'package:front_end/src/fasta/messages.dart';
import 'package:front_end/src/fasta/scanner.dart';
import 'package:front_end/src/fasta/scanner/io.dart';
+import 'package:front_end/src/fasta/severity.dart' show Severity;
import 'package:front_end/src/scanner/token.dart' as analyzer;
/// Implementation of [Instrumentation] which checks property/value pairs
@@ -200,8 +202,11 @@ class ValidatingInstrumentation implements Instrumentation {
String _formatProblem(
Uri uri, int offset, String desc, StackTrace stackTrace) {
- return deprecated_format(
- uri, offset, '$desc${stackTrace == null ? '' : '\n$stackTrace'}');
+ return CompilerContext.current.format(
+ templateUnspecified
+ .withArguments('$desc${stackTrace == null ? '' : '\n$stackTrace'}')
+ .withLocation(uri, offset),
+ Severity.internalProblem);
}
String _makeExpectationComment(String property, InstrumentationValue value) {

Powered by Google App Engine
This is Rietveld 408576698