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

Unified Diff: tests/compiler/dart2js/mirrors_used_test.dart

Issue 2056903003: Remove Registry from registerMetadataConstant (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add missing annotations Created 4 years, 6 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698