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

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

Issue 10870010: Evaluate compile-time constants of metadata. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review commens Created 8 years, 4 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
Index: dart/tests/compiler/dart2js/metadata_test.dart
diff --git a/dart/tests/compiler/dart2js/metadata_test.dart b/dart/tests/compiler/dart2js/metadata_test.dart
index ca99d8ae198ea3eaea6b5025ade58971cb1f6740..3961e7065ac45b8df1634d8bab84b36a00f8fe7f 100644
--- a/dart/tests/compiler/dart2js/metadata_test.dart
+++ b/dart/tests/compiler/dart2js/metadata_test.dart
@@ -17,11 +17,11 @@ void testClassMetadata() {
check(compiler, element) {
Expect.isFalse(element.metadata.isEmpty());
+ Expect.isTrue(element.metadata.tail.isEmpty());
MetadataAnnotation annotation = element.metadata.head;
- Expect.isNotNull(annotation);
+ annotation.ensureResolved(compiler);
Constant value = annotation.value;
- return; // TODO(ahe): I'm working on the following.
- Expect.isNotNull(value);
+ Expect.stringEquals('xyz', value.value.slowToString());
}
compileAndCheck(source, 'Foo', check);
@@ -35,11 +35,11 @@ void testTopLevelMethodMetadata() {
check(compiler, element) {
Expect.isFalse(element.metadata.isEmpty());
+ Expect.isTrue(element.metadata.tail.isEmpty());
MetadataAnnotation annotation = element.metadata.head;
- Expect.isNotNull(annotation);
+ annotation.ensureResolved(compiler);
Constant value = annotation.value;
- return; // TODO(ahe): I'm working on the following.
- Expect.isNotNull(value);
+ Expect.stringEquals('xyz', value.value.slowToString());
}
compileAndCheck(source, 'main', check);

Powered by Google App Engine
This is Rietveld 408576698