mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
sort: use SmallRng instead of Pcg32 in test
This commit is contained in:
parent
019da22964
commit
70d6ac9812
1 changed files with 2 additions and 1 deletions
|
@ -1263,6 +1263,7 @@ fn test_tmp_files_deleted_on_sigint() {
|
||||||
use std::{fs::read_dir, time::Duration};
|
use std::{fs::read_dir, time::Duration};
|
||||||
|
|
||||||
use nix::{sys::signal, unistd::Pid};
|
use nix::{sys::signal, unistd::Pid};
|
||||||
|
use rand::rngs::SmallRng;
|
||||||
|
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
at.mkdir("tmp_dir");
|
at.mkdir("tmp_dir");
|
||||||
|
@ -1273,7 +1274,7 @@ fn test_tmp_files_deleted_on_sigint() {
|
||||||
let mut file = at.make_file(file_name);
|
let mut file = at.make_file(file_name);
|
||||||
// approximately 20 MB
|
// approximately 20 MB
|
||||||
for _ in 0..40 {
|
for _ in 0..40 {
|
||||||
let lines = rand_pcg::Pcg32::seed_from_u64(123)
|
let lines = SmallRng::seed_from_u64(123)
|
||||||
.sample_iter(rand::distributions::uniform::Uniform::new(0, 10000))
|
.sample_iter(rand::distributions::uniform::Uniform::new(0, 10000))
|
||||||
.take(100_000)
|
.take(100_000)
|
||||||
.map(|x| x.to_string() + "\n")
|
.map(|x| x.to_string() + "\n")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue