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

Side by Side Diff: samples/sample_extension/test_sample_asynchronous_extension.dart

Issue 11364134: Merge libv1. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library("test_sample_extension"); 5 library test_sample_extension;
6 6
7 #import("sample_asynchronous_extension.dart"); 7 import 'sample_asynchronous_extension.dart';
8 8
9 // TODO(3008): Run this test automatically on buildbot (dart:3008). 9 // TODO(3008): Run this test automatically on buildbot (dart:3008).
10 void main() { 10 void main() {
11 RandomArray r = new RandomArray(); 11 RandomArray r = new RandomArray();
12 r.randomArray(100, 17, (list_100) { 12 r.randomArray(100, 17, (list_100) {
13 r.randomArray(200, 17, (list_200) { 13 r.randomArray(200, 17, (list_200) {
14 for (var i = 0; i < 100; ++i) { 14 for (var i = 0; i < 100; ++i) {
15 Expect.equals(list_100[i], list_200[i]); 15 Expect.equals(list_100[i], list_200[i]);
16 } 16 }
17 }); 17 });
(...skipping 24 matching lines...) Expand all
42 Expect.isTrue(counts_2[i] < 1200); 42 Expect.isTrue(counts_2[i] < 1200);
43 Expect.isTrue(counts[i] > 800); 43 Expect.isTrue(counts[i] > 800);
44 Expect.isTrue(counts[i] > 800); 44 Expect.isTrue(counts[i] > 800);
45 45
46 product += counts[i] * counts_2[i]; 46 product += counts[i] * counts_2[i];
47 } 47 }
48 Expect.isTrue(product < 256000000 * 1.001); 48 Expect.isTrue(product < 256000000 * 1.001);
49 Expect.isTrue(product > 256000000 * 0.999); 49 Expect.isTrue(product > 256000000 * 0.999);
50 }; 50 };
51 } 51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698