void Reset(int seed) {
random_.Reseed(seed);
}
+ uint16_t Rand16(void) {
+ const uint32_t value =
+ random_.Generate(testing::internal::Random::kMaxRange);
+ return (value >> 15) & 0xffff;
+ }
uint8_t Rand8(void) {
const uint32_t value =
random_.Generate(testing::internal::Random::kMaxRange);
// There's a bit more entropy in the upper bits of this implementation.
- return (value >> 24) & 0xff;
+ return (value >> 23) & 0xff;
}
uint8_t Rand8Extremes(void) {