diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-04-28 16:17:42 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-04-28 16:17:42 +0000 |
commit | 566924ed79eb0453f73727e8dd701b9eef89bf88 (patch) | |
tree | 2ce94d7f0804ccb77d1fa9b2a1bca00eecdff1e2 /third_party/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc | |
parent | 1617de0c4eb67771c18a455edc02363437b58dac (diff) | |
parent | 7563023510bf04108a954596ea9393a4c11ac279 (diff) | |
download | webrtc-566924ed79eb0453f73727e8dd701b9eef89bf88.tar.gz |
Snap for 8512216 from 7563023510bf04108a954596ea9393a4c11ac279 to tm-frc-neuralnetworks-releaset_frc_neu_330443030t_frc_neu_330443000android13-frc-neuralnetworks-release
Change-Id: I04b3e6ce8b80719275a139e817e31d2f74d409b0
Diffstat (limited to 'third_party/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc')
-rw-r--r-- | third_party/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/third_party/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc b/third_party/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc index 5270531d20..5e780d96d3 100644 --- a/third_party/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc +++ b/third_party/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc @@ -27,6 +27,7 @@ #include "absl/base/internal/raw_logging.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" @@ -121,7 +122,10 @@ class LogUniformIntChiSquaredTest // data generated by the log-uniform-int distribution. double ChiSquaredTestImpl(); - 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}; }; double LogUniformIntChiSquaredTest::ChiSquaredTestImpl() { @@ -194,7 +198,6 @@ double LogUniformIntChiSquaredTest::ChiSquaredTestImpl() { TEST_P(LogUniformIntChiSquaredTest, MultiTest) { const int kTrials = 5; - int failures = 0; for (int i = 0; i < kTrials; i++) { double p_value = ChiSquaredTestImpl(); |