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

Unified Diff: tests/corelib/growable_list_test.dart

Issue 1440663003: Add "growable" parameter to List.filled constructor. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « sdk/lib/core/list.dart ('k') | tests/corelib/list_filled_type_argument_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/growable_list_test.dart
diff --git a/tests/corelib/growable_list_test.dart b/tests/corelib/growable_list_test.dart
index b1d6e0962b5911208714527e6ebb53903d70f3c1..4b125bf3d20cdac8052dfbc6dfcbc95f5183a1ce 100644
--- a/tests/corelib/growable_list_test.dart
+++ b/tests/corelib/growable_list_test.dart
@@ -88,8 +88,10 @@ void testConstructor() {
}
testFixedLength(new List<int>(0));
testFixedLength(new List<int>(5));
+ testFixedLength(new List<int>.filled(5, null)); // default growable: false.
testGrowable(new List<int>());
testGrowable(new List<int>()..length = 5);
+ testGrowable(new List<int>.filled(5, null, growable: true));
Expect.throws(() => new List<int>(-1), (e) => e is ArgumentError, "-1");
// There must be limits. Fix this test if we ever allow 10^30 elements.
Expect.throws(() => new List<int>(0x1000000000000000000000000000000),
« no previous file with comments | « sdk/lib/core/list.dart ('k') | tests/corelib/list_filled_type_argument_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698