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

Unified Diff: samples/sample_extension/test_sample_asynchronous_extension.dart

Issue 13956006: Remove insertRange. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebuild DOM (unrelated CL) and update status files. Created 7 years, 8 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/tests/vm/dart/byte_array_test.dart ('k') | samples/swarm/swarm_ui_lib/observable/observable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/sample_extension/test_sample_asynchronous_extension.dart
diff --git a/samples/sample_extension/test_sample_asynchronous_extension.dart b/samples/sample_extension/test_sample_asynchronous_extension.dart
index 17ee6615b56c199d9409af7d4b07028f1b962479..329db045416accf04fca91c44112da66f9f0c982 100644
--- a/samples/sample_extension/test_sample_asynchronous_extension.dart
+++ b/samples/sample_extension/test_sample_asynchronous_extension.dart
@@ -25,16 +25,14 @@ void main() {
void checkNormal(List l) {
// Count how many times each byte value occurs. Assert that the counts
// are all withing a reasonable (six-sigma) range.
- List counts = new List<int>();
- counts.insertRange(0, 256, 0);
+ List counts = new List<int>.filled(256, 0);
for (var e in l) { counts[e]++; }
new RandomArray().randomArray(256000, 18, checkCorrelation(counts));
}
void checkCorrelation(List counts) {
return (List l) {
- List counts_2 = new List<int>();
- counts_2.insertRange(0, 256, 0);
+ List counts_2 = new List<int>.filled(256, 0);
for (var e in l) { counts_2[e]++; }
var product = 0;
for (var i = 0; i < 256; ++i) {
« no previous file with comments | « runtime/tests/vm/dart/byte_array_test.dart ('k') | samples/swarm/swarm_ui_lib/observable/observable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698