We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae365ef commit fd2660bCopy full SHA for fd2660b
src/prng/isaac64.rs
@@ -371,6 +371,28 @@ mod test {
371
11788097613744130851, 10391409374914919106));
372
}
373
374
+ #[test]
375
+ fn test_isaac64_true_values_32() {
376
+ let seed: &[_] = &[1, 23, 456, 7890, 12345];
377
+ let mut rng1 = Isaac64Rng::from_seed(seed);
378
+ let v = (0..10).map(|_| rng1.next_u32()).collect::<Vec<_>>();
379
+ // Subset of above values, as an LE u32 sequence
380
+ // TODO: switch to this sequence?
381
+// assert_eq!(v,
382
+// [141028748, 127386717,
383
+// 1058730652, 3347555894,
384
+// 851491469, 4039984500,
385
+// 2692730210, 288449107,
386
+// 646103879, 2782923823]);
387
+ // Subset of above values, using only low-half of each u64
388
+ assert_eq!(v,
389
+ [141028748, 1058730652,
390
+ 851491469, 2692730210,
391
+ 646103879, 4195642895,
392
+ 2836348583, 1312677241,
393
+ 999139615, 253604626]);
394
+ }
395
+
396
#[test]
397
fn test_isaac64_true_bytes() {
398
let seed: &[_] = &[1, 23, 456, 7890, 12345];
0 commit comments