| Index: dart/tests/compiler/dart2js/message_kind_helper.dart
|
| diff --git a/dart/tests/compiler/dart2js/message_kind_helper.dart b/dart/tests/compiler/dart2js/message_kind_helper.dart
|
| index 6302bf190608302f6e25b8b008093c02377840c4..b7163fe8369661572f6b0ebb4ab7ffd982207404 100644
|
| --- a/dart/tests/compiler/dart2js/message_kind_helper.dart
|
| +++ b/dart/tests/compiler/dart2js/message_kind_helper.dart
|
| @@ -14,13 +14,8 @@ import 'memory_compiler.dart';
|
|
|
| const String ESCAPE_REGEXP = r'[[\]{}()*+?.\\^$|]';
|
|
|
| -Compiler check(MessageKind kind, Compiler cachedCompiler,
|
| - {bool expectNoHowToFix: false}) {
|
| - if (expectNoHowToFix) {
|
| - Expect.isNull(kind.howToFix);
|
| - } else {
|
| - Expect.isNotNull(kind.howToFix);
|
| - }
|
| +Compiler check(MessageKind kind, Compiler cachedCompiler) {
|
| + Expect.isNotNull(kind.howToFix);
|
| Expect.isFalse(kind.examples.isEmpty);
|
|
|
| for (String example in kind.examples) {
|
| @@ -42,7 +37,7 @@ Compiler check(MessageKind kind, Compiler cachedCompiler,
|
|
|
| Expect.isFalse(messages.isEmpty, 'No messages in """$example"""');
|
|
|
| - String expectedText = kind.howToFix == null
|
| + String expectedText = !kind.hasHowToFix
|
| ? kind.template : '${kind.template}\n${kind.howToFix}';
|
| String pattern = expectedText.replaceAllMapped(
|
| new RegExp(ESCAPE_REGEXP), (m) => '\\${m[0]}');
|
| @@ -52,6 +47,8 @@ Compiler check(MessageKind kind, Compiler cachedCompiler,
|
| Expect.isTrue(new RegExp('^$pattern\$').hasMatch(message),
|
| '"$pattern" does not match "$message"');
|
| }
|
| - return compiler;
|
| + cachedCompiler = compiler;
|
| }
|
| +
|
| + return cachedCompiler;
|
| }
|
|
|