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

Unified Diff: tests/corelib_2/list_unmodifiable_test.dart

Issue 2992833002: Migrated test block 15 to Dart 2.0. (Closed)
Patch Set: Created 3 years, 5 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 | « tests/corelib_2/list_to_string_test.dart ('k') | tests/corelib_strong/corelib_strong.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib_2/list_unmodifiable_test.dart
diff --git a/tests/corelib/list_unmodifiable_test.dart b/tests/corelib_2/list_unmodifiable_test.dart
similarity index 92%
rename from tests/corelib/list_unmodifiable_test.dart
rename to tests/corelib_2/list_unmodifiable_test.dart
index 1a29c0030bc5ce6b2044ff5681e11bf3b05e4b76..6c57d29d59c7cc3133a61ffad6e6080330638797 100644
--- a/tests/corelib/list_unmodifiable_test.dart
+++ b/tests/corelib_2/list_unmodifiable_test.dart
@@ -214,90 +214,90 @@ class Test<E> {
}
}
Bob Nystrom 2017/08/02 20:50:46 Can you type these more precisely? If not, that's
-createConstList(n) {
+Iterable createConstList(int n) {
if (n == 0) return const <int>[];
return const <int>[1, 2, 3];
}
-createFixedList(n) {
+Iterable createFixedList(int n) {
var result = new List<int>(n);
for (int i = 0; i < n; i++) result[i] = n;
return result;
}
-createGrowableList(n) {
+List<int> createGrowableList(int n) {
var result = new List<int>()..length = n;
for (int i = 0; i < n; i++) result[i] = n;
return result;
}
-createIterable(n) => new Iterable.generate(n);
-createConstMapKeys(n) {
+Iterable createIterable(int n) => new Iterable.generate(n);
+Iterable createConstMapKeys(int n) {
if (n == 0) return const <int, int>{}.keys;
return const <int, int>{0: 0, 1: 1, 2: 2}.keys;
}
-createConstMapValues(n) {
+Iterable createConstMapValues(int n) {
if (n == 0) return const <int, int>{}.values;
return const <int, int>{0: 0, 1: 1, 2: 2}.values;
}
-createMapKeys(n) {
+Iterable createMapKeys(int n) {
var map = <int, int>{};
for (int i = 0; i < n; i++) map[i] = i;
return map.keys;
}
-createMapValues(n) {
+Iterable createMapValues(int n) {
var map = <int, int>{};
for (int i = 0; i < n; i++) map[i] = i;
return map.values;
}
-createSplayMapKeys(n) {
+Iterable createSplayMapKeys(int n) {
var map = new SplayTreeMap<int, int>();
for (int i = 0; i < n; i++) map[i] = i;
return map.keys;
}
-createSplayMapValues(n) {
+Iterable createSplayMapValues(int n) {
var map = new SplayTreeMap<int, int>();
for (int i = 0; i < n; i++) map[i] = i;
return map.values;
}
-createSet(n) {
+Iterable createSet(int n) {
var set = new Set<int>();
for (int i = 0; i < n; i++) set.add(i);
return set;
}
-createSplaySet(n) {
+Iterable createSplaySet(int n) {
var set = new SplayTreeSet<int>();
for (int i = 0; i < n; i++) set.add(i);
return set;
}
-createQueue(n) {
+Iterable createQueue(int n) {
var queue = new Queue<int>();
for (int i = 0; i < n; i++) queue.add(i);
return queue;
}
-createListMapKeys(n) {
+Iterable createListMapKeys(int n) {
return createGrowableList(n).asMap().keys;
}
-createListMapValues(n) {
+Iterable createListMapValues(int n) {
return createGrowableList(n).asMap().values;
}
-createCodeUnits(n) {
+Iterable createCodeUnits(int n) {
var string = new String.fromCharCodes(new Iterable.generate(n));
return string.codeUnits;
}
-createTypedList(n) {
+Iterable createTypedList(int n) {
var tl = new Uint8List(n);
for (int i = 0; i < n; i++) tl[i] = i;
return tl;
« no previous file with comments | « tests/corelib_2/list_to_string_test.dart ('k') | tests/corelib_strong/corelib_strong.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698