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

Unified Diff: tests/corelib/src/ConstListLiteralTest.dart

Issue 8914024: frog: better binding of methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 9 years 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 | « frog/tests/frog/frog.status ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/src/ConstListLiteralTest.dart
diff --git a/tests/corelib/src/ConstListLiteralTest.dart b/tests/corelib/src/ConstListLiteralTest.dart
index c7ba4419f27bf22ef3d3e0cf9100387bb8a902ea..fd52b665c3824be415aba178fcb6f0d1b811bfbe 100644
--- a/tests/corelib/src/ConstListLiteralTest.dart
+++ b/tests/corelib/src/ConstListLiteralTest.dart
@@ -61,6 +61,14 @@ class ConstListLiteralTest {
Expect.equals(4, list[0]);
Expect.equals(2, list[1]);
Expect.equals(3, list[2]);
+
+ // Note: the next check is a regression test for frog. The immutable list
+ // overrides the 'length' property of List, but relies on using the native
+ // 'forEach' construct in Array. This test ensures that our strategy works
+ // correctly.
+ int x = 0;
+ list.forEach((e) { x += e; });
+ Expect.equals(9, x);
}
}
« no previous file with comments | « frog/tests/frog/frog.status ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698