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

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

Issue 263103003: Remove warnings from dart2js test-suite. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove debug code. Created 6 years, 7 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: tests/compiler/dart2js/metadata_test.dart
diff --git a/tests/compiler/dart2js/metadata_test.dart b/tests/compiler/dart2js/metadata_test.dart
index ab302ebf960390b577db4f90d0068c9fdb86c55b..1c7f596f7e751c3dd7e83333c3f3884eab53ab7d 100644
--- a/tests/compiler/dart2js/metadata_test.dart
+++ b/tests/compiler/dart2js/metadata_test.dart
@@ -6,6 +6,8 @@ import "package:expect/expect.dart";
import "package:async_helper/async_helper.dart";
import 'compiler_helper.dart';
import 'parser_helper.dart';
+import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
+ show PrimitiveConstant;
void checkPosition(Spannable spannable, Node node, String source, compiler) {
SourceSpan span = compiler.spanFromSpannable(spannable);
@@ -34,7 +36,7 @@ void checkAnnotation(String name, String declaration,
'Unexpected metadata count on $element.');
PartialMetadataAnnotation annotation = element.metadata.head;
annotation.ensureResolved(compiler);
- Constant value = annotation.value;
+ PrimitiveConstant value = annotation.value;
Expect.stringEquals('xyz', value.value.slowToString());
checkPosition(annotation, annotation.cachedNode, source1, compiler);
@@ -57,8 +59,8 @@ void checkAnnotation(String name, String declaration,
Expect.isFalse(identical(annotation1, annotation2),
'expected unique instances');
Expect.notEquals(annotation1, annotation2, 'expected unequal instances');
- Constant value1 = annotation1.value;
- Constant value2 = annotation2.value;
+ PrimitiveConstant value1 = annotation1.value;
+ PrimitiveConstant value2 = annotation2.value;
Expect.identical(value1, value2, 'expected same compile-time constant');
Expect.stringEquals('xyz', value1.value.slowToString());
Expect.stringEquals('xyz', value2.value.slowToString());
@@ -87,7 +89,7 @@ void checkAnnotation(String name, String declaration,
Expect.equals(1, length(element.metadata));
PartialMetadataAnnotation annotation = element.metadata.head;
annotation.ensureResolved(compiler);
- Constant value = annotation.value;
+ PrimitiveConstant value = annotation.value;
Expect.stringEquals('xyz', value.value.slowToString());
checkPosition(annotation, annotation.cachedNode, source3, compiler);
@@ -116,8 +118,8 @@ void checkAnnotation(String name, String declaration,
Expect.isFalse(identical(annotation1, annotation2),
'expected unique instances');
Expect.notEquals(annotation1, annotation2, 'expected unequal instances');
- Constant value1 = annotation1.value;
- Constant value2 = annotation2.value;
+ PrimitiveConstant value1 = annotation1.value;
+ PrimitiveConstant value2 = annotation2.value;
Expect.identical(value1, value2, 'expected same compile-time constant');
Expect.stringEquals('xyz', value1.value.slowToString());
Expect.stringEquals('xyz', value2.value.slowToString());
@@ -169,7 +171,7 @@ void testLibraryTags() {
PartialMetadataAnnotation annotation = metadata.head;
annotation.ensureResolved(compiler);
- Constant value = annotation.value;
+ PrimitiveConstant value = annotation.value;
Expect.stringEquals('xyz', value.value.slowToString());
checkPosition(annotation, annotation.cachedNode, source, compiler);
« no previous file with comments | « tests/compiler/dart2js/memory_source_file_helper.dart ('k') | tests/compiler/dart2js/mirror_helper_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698