700254996f
Change-Id: Ibc64b3371353850ff15153c06970a30e47a24888 Reviewed-on: https://dart-review.googlesource.com/c/89900 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com>
20 lines
565 B
Dart
20 lines
565 B
Dart
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// Test that Random can deal with a seed outside 64-bit range.
|
|
|
|
import "package:expect/expect.dart";
|
|
import 'dart:math';
|
|
|
|
main() {
|
|
var results = [];
|
|
for (var i = 60; i < 64; i++) {
|
|
var rng = new Random(1 << i);
|
|
var val = rng.nextInt(100000);
|
|
print("$i: $val");
|
|
Expect.isFalse(results.contains(val));
|
|
results.add(val);
|
|
}
|
|
}
|