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')); |