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

Unified Diff: test/codegen/corelib/iterable_test.dart

Issue 1945153002: Add corelib tests (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: error_test and range_error_test now pass Created 4 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
« no previous file with comments | « test/codegen/corelib/iterable_take_while_test.dart ('k') | test/codegen/corelib/iterable_to_list_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/corelib/iterable_test.dart
diff --git a/test/codegen/language/issue10561_test.dart b/test/codegen/corelib/iterable_test.dart
similarity index 58%
copy from test/codegen/language/issue10561_test.dart
copy to test/codegen/corelib/iterable_test.dart
index 24c308c9573e4fbe400d4821e49b9b0ed23e99f4..e7f6299c0ae684e468878327cf541f2ba87e0c7f 100644
--- a/test/codegen/language/issue10561_test.dart
+++ b/test/codegen/corelib/iterable_test.dart
@@ -2,16 +2,17 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Regression test for dart2js that used to miscompile classes
-// extending HashMap, because HashMap is patched.
+// Regression test for dart2js where [List.addAll] was not typed
+// correctly.
import "package:expect/expect.dart";
import 'dart:collection';
-class Foo extends Expando {
+class MyIterable extends IterableBase {
+ get iterator => [].iterator;
}
main() {
- Expect.isNull(new Foo()[new Object()]);
+ Expect.isTrue(([]..addAll(new MyIterable())).isEmpty);
}
« no previous file with comments | « test/codegen/corelib/iterable_take_while_test.dart ('k') | test/codegen/corelib/iterable_to_list_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698