| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |