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

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

Issue 8321024: Clean up (most) uses of Array. Still more to come in the VM corelib code base. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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 | « runtime/lib/string_buffer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/src/GrowableObjectArray2VMTest.dart
===================================================================
--- tests/corelib/src/GrowableObjectArray2VMTest.dart (revision 486)
+++ tests/corelib/src/GrowableObjectArray2VMTest.dart (working copy)
@@ -9,7 +9,7 @@
class GrowableObjectArray2Test {
static testMain() {
var g = new GrowableObjectArray();
- Expect.equals(true, g is Array);
+ Expect.equals(true, g is List);
Expect.equals(true, g is GrowableObjectArray);
Expect.equals(true, g.isEmpty());
for (int i = 0; i < 100; i++) {
@@ -24,29 +24,29 @@
Expect.equals(100, g.length);
var f = new GrowableObjectArray();
- var object_array = new Array(20);
- for (int i = 0; i < object_array.length; i++) {
+ var list = new List(20);
+ for (int i = 0; i < list.length; i++) {
f.add(2);
- object_array[i] = 5;
+ list[i] = 5;
}
- object_array.copyFrom(f, 0, 0, f.length);
+ list.copyFrom(f, 0, 0, f.length);
for (int i = 0; i < f.length; i++) {
- Expect.equals(2, object_array[i]);
+ Expect.equals(2, list[i]);
}
f.copyFrom(g, 10, 0, 2);
Expect.equals(20, f.length);
- bool exception_caught = false;
+ bool exceptionCaught = false;
try {
var elem = g[g.length];
} catch (IndexOutOfRangeException e) {
- exception_caught = true;
+ exceptionCaught = true;
}
- Expect.equals(true, exception_caught);
+ Expect.equals(true, exceptionCaught);
- Array<int> plain_array = [4, 3, 9, 12, -4, 9];
+ List<int> plainArray = [4, 3, 9, 12, -4, 9];
GrowableObjectArray h = new GrowableObjectArray.withCapacity(4);
- plain_array.forEach((elem) { h.add(elem); });
+ plainArray.forEach((elem) { h.add(elem); });
int compare(a, b) {
if (a < b) return -1;
if (a > b) return 1;
@@ -63,7 +63,7 @@
Expect.equals(5, t.length);
h.clear();
- Array array = const [0, 1, 2, 3, 4];
+ List array = const [0, 1, 2, 3, 4];
h.addAll(array);
Expect.equals(5, h.length);
}
« no previous file with comments | « runtime/lib/string_buffer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698