Replace std.rand references with std.Random
This commit is contained in:
@@ -866,7 +866,7 @@ test "std.PriorityDequeue: shrinkAndFree" {
|
||||
}
|
||||
|
||||
test "std.PriorityDequeue: fuzz testing min" {
|
||||
var prng = std.rand.DefaultPrng.init(0x12345678);
|
||||
var prng = std.Random.DefaultPrng.init(0x12345678);
|
||||
const random = prng.random();
|
||||
|
||||
const test_case_count = 100;
|
||||
@@ -878,7 +878,7 @@ test "std.PriorityDequeue: fuzz testing min" {
|
||||
}
|
||||
}
|
||||
|
||||
fn fuzzTestMin(rng: std.rand.Random, comptime queue_size: usize) !void {
|
||||
fn fuzzTestMin(rng: std.Random, comptime queue_size: usize) !void {
|
||||
const allocator = testing.allocator;
|
||||
const items = try generateRandomSlice(allocator, rng, queue_size);
|
||||
|
||||
@@ -895,7 +895,7 @@ fn fuzzTestMin(rng: std.rand.Random, comptime queue_size: usize) !void {
|
||||
}
|
||||
|
||||
test "std.PriorityDequeue: fuzz testing max" {
|
||||
var prng = std.rand.DefaultPrng.init(0x87654321);
|
||||
var prng = std.Random.DefaultPrng.init(0x87654321);
|
||||
const random = prng.random();
|
||||
|
||||
const test_case_count = 100;
|
||||
@@ -907,7 +907,7 @@ test "std.PriorityDequeue: fuzz testing max" {
|
||||
}
|
||||
}
|
||||
|
||||
fn fuzzTestMax(rng: std.rand.Random, queue_size: usize) !void {
|
||||
fn fuzzTestMax(rng: std.Random, queue_size: usize) !void {
|
||||
const allocator = testing.allocator;
|
||||
const items = try generateRandomSlice(allocator, rng, queue_size);
|
||||
|
||||
@@ -924,7 +924,7 @@ fn fuzzTestMax(rng: std.rand.Random, queue_size: usize) !void {
|
||||
}
|
||||
|
||||
test "std.PriorityDequeue: fuzz testing min and max" {
|
||||
var prng = std.rand.DefaultPrng.init(0x87654321);
|
||||
var prng = std.Random.DefaultPrng.init(0x87654321);
|
||||
const random = prng.random();
|
||||
|
||||
const test_case_count = 100;
|
||||
@@ -936,7 +936,7 @@ test "std.PriorityDequeue: fuzz testing min and max" {
|
||||
}
|
||||
}
|
||||
|
||||
fn fuzzTestMinMax(rng: std.rand.Random, queue_size: usize) !void {
|
||||
fn fuzzTestMinMax(rng: std.Random, queue_size: usize) !void {
|
||||
const allocator = testing.allocator;
|
||||
const items = try generateRandomSlice(allocator, rng, queue_size);
|
||||
|
||||
@@ -963,7 +963,7 @@ fn fuzzTestMinMax(rng: std.rand.Random, queue_size: usize) !void {
|
||||
}
|
||||
}
|
||||
|
||||
fn generateRandomSlice(allocator: std.mem.Allocator, rng: std.rand.Random, size: usize) ![]u32 {
|
||||
fn generateRandomSlice(allocator: std.mem.Allocator, rng: std.Random, size: usize) ![]u32 {
|
||||
var array = std.ArrayList(u32).init(allocator);
|
||||
try array.ensureTotalCapacity(size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user