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