diff options
Diffstat (limited to 'absl/random/zipf_distribution_test.cc')
-rw-r--r-- | absl/random/zipf_distribution_test.cc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/absl/random/zipf_distribution_test.cc b/absl/random/zipf_distribution_test.cc index c8bb89db..801ec4f6 100644 --- a/absl/random/zipf_distribution_test.cc +++ b/absl/random/zipf_distribution_test.cc @@ -25,7 +25,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "absl/base/internal/raw_logging.h" +#include "absl/log/log.h" #include "absl/random/internal/chi_square.h" #include "absl/random/internal/pcg_engine.h" #include "absl/random/internal/sequence_urbg.h" @@ -102,8 +102,7 @@ TYPED_TEST(ZipfDistributionTypedTest, SerializeTest) { if (sample > sample_max) sample_max = sample; if (sample < sample_min) sample_min = sample; } - ABSL_INTERNAL_LOG(INFO, - absl::StrCat("Range: ", +sample_min, ", ", +sample_max)); + LOG(INFO) << "Range: " << sample_min << ", " << sample_max; } } @@ -303,18 +302,15 @@ TEST_P(ZipfTest, ChiSquaredTest) { // Log if the chi_squared value is above the threshold. if (chi_square > threshold) { - ABSL_INTERNAL_LOG(INFO, "values"); + LOG(INFO) << "values"; for (size_t i = 0; i < expected.size(); i++) { - ABSL_INTERNAL_LOG(INFO, absl::StrCat(points[i], ": ", buckets[i], - " vs. E=", expected[i])); + LOG(INFO) << points[i] << ": " << buckets[i] << " vs. E=" << expected[i]; } - ABSL_INTERNAL_LOG(INFO, absl::StrCat("trials ", trials)); - ABSL_INTERNAL_LOG(INFO, - absl::StrCat("mean ", avg, " vs. expected ", mean())); - ABSL_INTERNAL_LOG(INFO, absl::StrCat(kChiSquared, "(data, ", dof, ") = ", - chi_square, " (", p_actual, ")")); - ABSL_INTERNAL_LOG(INFO, - absl::StrCat(kChiSquared, " @ 0.9995 = ", threshold)); + LOG(INFO) << "trials " << trials; + LOG(INFO) << "mean " << avg << " vs. expected " << mean(); + LOG(INFO) << kChiSquared << "(data, " << dof << ") = " << chi_square << " (" + << p_actual << ")"; + LOG(INFO) << kChiSquared << " @ 0.9995 = " << threshold; FAIL() << kChiSquared << " value of " << chi_square << " is above the threshold."; } |