diff options
author | Benjamin Barenblat <bbaren@google.com> | 2020-09-25 17:10:06 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2020-09-25 17:10:06 -0400 |
commit | 4e1c98fe594d99494ce26e94a77f0358705f227c (patch) | |
tree | a07e9daefa3b5acf716ce89fa1a1c9b500fde795 /absl/random/exponential_distribution_test.cc | |
parent | 7a1e14d0d29736ba9c2884d0ce81fc0af92f6ab3 (diff) | |
parent | b56cbdd23834a65682c0b46f367f8679e83bc894 (diff) |
Merge new upstream LTS 20200923
Diffstat (limited to 'absl/random/exponential_distribution_test.cc')
-rw-r--r-- | absl/random/exponential_distribution_test.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/absl/random/exponential_distribution_test.cc b/absl/random/exponential_distribution_test.cc index f3cfd764..8e9e69b6 100644 --- a/absl/random/exponential_distribution_test.cc +++ b/absl/random/exponential_distribution_test.cc @@ -32,6 +32,7 @@ #include "absl/base/macros.h" #include "absl/random/internal/chi_square.h" #include "absl/random/internal/distribution_test_util.h" +#include "absl/random/internal/pcg_engine.h" #include "absl/random/internal/sequence_urbg.h" #include "absl/random/random.h" #include "absl/strings/str_cat.h" @@ -205,7 +206,10 @@ class ExponentialDistributionTests : public testing::TestWithParam<Param>, template <typename D> double SingleChiSquaredTest(); - absl::InsecureBitGen rng_; + // We use a fixed bit generator for distribution accuracy tests. This allows + // these tests to be deterministic, while still testing the qualify of the + // implementation. + absl::random_internal::pcg64_2018_engine rng_{0x2B7E151628AED2A6}; }; template <typename D> |