mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
tests/random: add get_bool() overload with random engine param
This commit is contained in:
@@ -129,9 +129,14 @@ Real get_real() {
|
||||
return get_real<Real>(Real{0}, std::numeric_limits<Real>::max(), gen());
|
||||
}
|
||||
|
||||
inline bool get_bool() {
|
||||
template <typename RandomEngine>
|
||||
inline bool get_bool(RandomEngine& engine) {
|
||||
static std::bernoulli_distribution dist;
|
||||
return dist(gen());
|
||||
return dist(engine);
|
||||
}
|
||||
|
||||
inline bool get_bool() {
|
||||
return get_bool(gen());
|
||||
}
|
||||
|
||||
inline bytes get_bytes(size_t n) {
|
||||
|
||||
Reference in New Issue
Block a user