| Index: dart/tests/compiler/dart2js/mock_compiler.dart
|
| diff --git a/dart/tests/compiler/dart2js/mock_compiler.dart b/dart/tests/compiler/dart2js/mock_compiler.dart
|
| index 8694ef6b7ec80141f3c4964de7b108c03bd480fc..f26db798cde7efadce57c38e2a911f0ab1c3bc18 100644
|
| --- a/dart/tests/compiler/dart2js/mock_compiler.dart
|
| +++ b/dart/tests/compiler/dart2js/mock_compiler.dart
|
| @@ -11,6 +11,7 @@
|
| #import('../../../lib/compiler/implementation/source_file.dart');
|
| #import("../../../lib/compiler/implementation/tree/tree.dart");
|
| #import("../../../lib/compiler/implementation/util/util.dart");
|
| +#import('../../../lib/compiler/compiler.dart', prefix: 'api');
|
| #import("parser_helper.dart");
|
|
|
| class WarningMessage {
|
| @@ -105,6 +106,15 @@ class MockCompiler extends Compiler {
|
| errors.add(new WarningMessage(node, message.message));
|
| }
|
|
|
| + void reportMessage(SourceSpan span, var message, api.Diagnostic kind) {
|
| + var diagnostic = new WarningMessage(null, message.message);
|
| + if (kind === api.Diagnostic.ERROR) {
|
| + errors.add(diagnostic);
|
| + } else {
|
| + warnings.add(diagnostic);
|
| + }
|
| + }
|
| +
|
| void reportDiagnostic(SourceSpan span, String message, var kind) {
|
| print(message);
|
| }
|
|
|