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

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

Issue 11416004: Reject deprecated language features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: abstract class in resolver test Created 8 years, 1 month 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/value_range_test.dart
diff --git a/dart/tests/compiler/dart2js/value_range_test.dart b/dart/tests/compiler/dart2js/value_range_test.dart
index d05ce30ab0dd7ccdf5b96fd59138a7d52ab4c114..3a78bdcc5a0e3bf0fe5fb35441771031800fe9c1 100644
--- a/dart/tests/compiler/dart2js/value_range_test.dart
+++ b/dart/tests/compiler/dart2js/value_range_test.dart
@@ -198,8 +198,30 @@ main(value) {
REMOVED,
];
+// TODO(ahe): It would probably be better if this test used the real
+// core library sources, as its purpose is to detect failure to
+// optimize fixed-sized arrays.
+const String DEFAULT_CORELIB_WITH_LIST_INTERFACE = r'''
+ print(var obj) {}
+ abstract class num {}
+ abstract class int extends num { }
+ abstract class double extends num { }
+ class bool {}
+ class String {}
+ class Object {}
+ class Type {}
+ class Function {}
+ interface List default ListImplementation { List([length]);}
+ class ListImplementation { factory List([length]) => null; }
+ abstract class Map {}
+ class Closure {}
+ class Null {}
+ class Dynamic_ {}
+ bool identical(Object a, Object b) {}''';
+
expect(String code, int kind) {
- String generated = compile(code);
+ String generated =
+ compile(code, coreSource: DEFAULT_CORELIB_WITH_LIST_INTERFACE);
switch (kind) {
case REMOVED:
Expect.isTrue(!generated.contains('ioore'));

Powered by Google App Engine
This is Rietveld 408576698