| Index: tests/compiler/dart2js/mirrors_used_test.dart
|
| diff --git a/tests/compiler/dart2js/mirrors_used_test.dart b/tests/compiler/dart2js/mirrors_used_test.dart
|
| index dffab8af88acd6885003a9e98d2c5f07a70efa44..fc08b6b82f9fb6e254c5f212c87736ba0b5e1f05 100644
|
| --- a/tests/compiler/dart2js/mirrors_used_test.dart
|
| +++ b/tests/compiler/dart2js/mirrors_used_test.dart
|
| @@ -127,18 +127,22 @@ void main() {
|
| });
|
| }
|
|
|
| - // There should at least be one metadata constant:
|
| - // 1. The constructed constant for 'MirrorsUsed'.
|
| - Expect.isTrue(backend.metadataConstants.length >= 1);
|
| -
|
| + int metadataCount = 0;
|
| Set<ConstantValue> compiledConstants = backend.constants.compiledConstants;
|
| // Make sure that most of the metadata constants aren't included in the
|
| // generated code.
|
| - for (var dependency in backend.metadataConstants) {
|
| - ConstantValue constant = dependency.constant;
|
| + backend.processMetadata(
|
| + compiler.enqueuer.resolution.processedElements, (metadata) {
|
| + ConstantValue constant =
|
| + backend.constants.getConstantValueForMetadata(metadata);
|
| Expect.isFalse(compiledConstants.contains(constant),
|
| constant.toStructuredText());
|
| - }
|
| + metadataCount++;
|
| + });
|
| +
|
| + // There should at least be one metadata constant:
|
| + // 1. The constructed constant for 'MirrorsUsed'.
|
| + Expect.isTrue(metadataCount >= 1);
|
|
|
| // The type literal 'Foo' is both used as metadata, and as a plain value in
|
| // the program. Make sure that it isn't duplicated.
|
|
|