#include <gtest-internal.h>
Definition at line 870 of file gtest-internal.h.
◆ Random()
testing::internal::Random::Random |
( |
uint32_t |
seed | ) |
|
|
inlineexplicit |
◆ Generate()
uint32_t testing::internal::Random::Generate |
( |
uint32_t |
range | ) |
|
Definition at line 348 of file gtest.cc.
348 {
349
350
351 state_ =
static_cast<uint32_t
>(1103515245ULL*state_ + 12345U) %
kMaxRange;
352
354 << "Cannot generate a number in the range [0, 0).";
356 << "Generation of a number in [0, " << range << ") was requested, "
357 <<
"but this can only generate numbers in [0, " <<
kMaxRange <<
").";
358
359
360
361
362 return state_ % range;
363}
#define GTEST_CHECK_(condition)
static const uint32_t kMaxRange
◆ Reseed()
void testing::internal::Random::Reseed |
( |
uint32_t |
seed | ) |
|
|
inline |
◆ kMaxRange
const uint32_t testing::internal::Random::kMaxRange = 1u << 31 |
|
static |
The documentation for this class was generated from the following files:
- /media/home/debian/src/github/tesseract-ocr/tesseract/unittest/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h
- /media/home/debian/src/github/tesseract-ocr/tesseract/unittest/third_party/googletest/googletest/src/gtest.cc