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

Side by Side Diff: tests/lib_2/math/random_big_test.dart

Issue 2995343002: Migrated test block 216 to Dart 2.0. (Closed)
Patch Set: Migrated min_max_test to Dart 2.0 Created 3 years, 3 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 unified diff | Download patch
« no previous file with comments | « tests/lib_2/math/point_test.dart ('k') | tests/lib_2/math/random_secure_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // Test that Random can deal with a seed outside 64-bit range. 5 // Test that Random can deal with a seed outside 64-bit range.
6 6
7 // Library tag to allow Dartium to run the test. 7 // Library tag to allow Dartium to run the test.
8 library random_big; 8 library random_big;
9 9
10 import "package:expect/expect.dart"; 10 import "package:expect/expect.dart";
11 import 'dart:math'; 11 import 'dart:math';
12 12
13 main() { 13 main() {
14 var results = []; 14 var results = [];
15 for (var i = 60; i < 80; i++) { 15 for (var i = 60; i < 80; i++) {
16 var rng = new Random(1 << i); 16 var rng = new Random(1 << i);
17 var val = rng.nextInt(100000); 17 var val = rng.nextInt(100000);
18 print("$i: $val"); 18 print("$i: $val");
19 Expect.isFalse(results.contains(val)); 19 Expect.isFalse(results.contains(val));
20 results.add(val); 20 results.add(val);
21 } 21 }
22 } 22 }
OLDNEW
« no previous file with comments | « tests/lib_2/math/point_test.dart ('k') | tests/lib_2/math/random_secure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698