| Index: tests/compiler/dart2js/message_kind_helper.dart
|
| diff --git a/tests/compiler/dart2js/message_kind_helper.dart b/tests/compiler/dart2js/message_kind_helper.dart
|
| index b4c554027bb7a3a1a5b008ce87f19d332cec04d3..b702d021e1d738ec8701e8dfaf0cc61f7b88bf5d 100644
|
| --- a/tests/compiler/dart2js/message_kind_helper.dart
|
| +++ b/tests/compiler/dart2js/message_kind_helper.dart
|
| @@ -44,13 +44,18 @@ Future<Compiler> check(MessageKind kind, Compiler cachedCompiler) {
|
| new RegExp(ESCAPE_REGEXP), (m) => '\\${m[0]}');
|
| pattern = pattern.replaceAll(new RegExp(r'#\\\{[^}]*\\\}'), '.*');
|
|
|
| + // TODO(johnniwinther): Extend MessageKind to contain information on
|
| + // where info messages are expected.
|
| + bool messageFound = false;
|
| for (String message in messages) {
|
| - Expect.isTrue(new RegExp('^$pattern\$').hasMatch(message),
|
| - '"$pattern" does not match "$message"');
|
| + if (new RegExp('^$pattern\$').hasMatch(message)) {
|
| + messageFound = true;
|
| + }
|
| }
|
| + Expect.isTrue(messageFound, '"$pattern" does not match any in $messages');
|
| return compiler;
|
| });
|
| }
|
|
|
| - return cachedCompiler;
|
| + return new Future<Compiler>.sync(cachedCompiler);
|
| }
|
|
|