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

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

Issue 1383503002: Add Resolution and Parsing interfaces for computeType, ensureResolved and parseNode. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add TODOs. Created 5 years, 3 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 | « tests/compiler/dart2js/least_upper_bound_test.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/metadata_test.dart
diff --git a/tests/compiler/dart2js/metadata_test.dart b/tests/compiler/dart2js/metadata_test.dart
index 205c897fd2a8ce7acef50bd3cd7b97fb7c7ce0e7..f17ac062639fcdf3297415fb082750d3c6f96b64 100644
--- a/tests/compiler/dart2js/metadata_test.dart
+++ b/tests/compiler/dart2js/metadata_test.dart
@@ -36,7 +36,7 @@ void checkAnnotation(String name, String declaration,
Expect.equals(1, element.metadata.length,
'Unexpected metadata count on $element.');
PartialMetadataAnnotation annotation = element.metadata.first;
- annotation.ensureResolved(compiler);
+ annotation.ensureResolved(compiler.resolution);
PrimitiveConstantValue value =
compiler.constants.getConstantValue(annotation.constant);
Expect.stringEquals('xyz', value.primitiveValue.slowToString());
@@ -56,8 +56,8 @@ void checkAnnotation(String name, String declaration,
Expect.equals(2, element.metadata.length);
PartialMetadataAnnotation annotation1 = element.metadata.elementAt(0);
PartialMetadataAnnotation annotation2 = element.metadata.elementAt(1);
- annotation1.ensureResolved(compiler);
- annotation2.ensureResolved(compiler);
+ annotation1.ensureResolved(compiler.resolution);
+ annotation2.ensureResolved(compiler.resolution);
Expect.isFalse(identical(annotation1, annotation2),
'expected unique instances');
Expect.notEquals(annotation1, annotation2, 'expected unequal instances');
@@ -87,12 +87,12 @@ void checkAnnotation(String name, String declaration,
compileAndCheck(source3, 'Foo', (compiler, element) {
compiler.enqueuer.resolution.queueIsClosed = false;
Expect.equals(0, element.metadata.length);
- element.ensureResolved(compiler);
+ element.ensureResolved(compiler.resolution);
Expect.equals(0, element.metadata.length);
element = element.lookupLocalMember(name);
Expect.equals(1, element.metadata.length);
PartialMetadataAnnotation annotation = element.metadata.first;
- annotation.ensureResolved(compiler);
+ annotation.ensureResolved(compiler.resolution);
PrimitiveConstantValue value =
compiler.constants.getConstantValue(annotation.constant);
Expect.stringEquals('xyz', value.primitiveValue.slowToString());
@@ -112,14 +112,14 @@ void checkAnnotation(String name, String declaration,
compileAndCheck(source4, 'Foo', (compiler, element) {
compiler.enqueuer.resolution.queueIsClosed = false;
Expect.equals(0, element.metadata.length);
- element.ensureResolved(compiler);
+ element.ensureResolved(compiler.resolution);
Expect.equals(0, element.metadata.length);
element = element.lookupLocalMember(name);
Expect.equals(2, element.metadata.length);
PartialMetadataAnnotation annotation1 = element.metadata.elementAt(0);
PartialMetadataAnnotation annotation2 = element.metadata.elementAt(1);
- annotation1.ensureResolved(compiler);
- annotation2.ensureResolved(compiler);
+ annotation1.ensureResolved(compiler.resolution);
+ annotation2.ensureResolved(compiler.resolution);
Expect.isFalse(identical(annotation1, annotation2),
'expected unique instances');
Expect.notEquals(annotation1, annotation2, 'expected unequal instances');
@@ -174,7 +174,7 @@ void testLibraryTags() {
Expect.equals(1, metadata.length);
PartialMetadataAnnotation annotation = metadata.first;
- annotation.ensureResolved(compiler);
+ annotation.ensureResolved(compiler.resolution);
PrimitiveConstantValue value =
compiler.constants.getConstantValue(annotation.constant);
Expect.stringEquals('xyz', value.primitiveValue.slowToString());
« no previous file with comments | « tests/compiler/dart2js/least_upper_bound_test.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698