diff options
Diffstat (limited to 'abseil-cpp/absl/random/log_uniform_int_distribution_test.cc')
-rw-r--r-- | abseil-cpp/absl/random/log_uniform_int_distribution_test.cc | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc b/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc index 5e780d9..5df3eda 100644 --- a/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc +++ b/abseil-cpp/absl/random/log_uniform_int_distribution_test.cc @@ -24,7 +24,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/distribution_test_util.h" #include "absl/random/internal/pcg_engine.h" @@ -42,7 +42,7 @@ class LogUniformIntDistributionTypeTest : public ::testing::Test {}; using IntTypes = ::testing::Types<int8_t, int16_t, int32_t, int64_t, // uint8_t, uint16_t, uint32_t, uint64_t>; -TYPED_TEST_CASE(LogUniformIntDistributionTypeTest, IntTypes); +TYPED_TEST_SUITE(LogUniformIntDistributionTypeTest, IntTypes); TYPED_TEST(LogUniformIntDistributionTypeTest, SerializeTest) { using param_type = @@ -108,8 +108,7 @@ TYPED_TEST(LogUniformIntDistributionTypeTest, 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; } } @@ -182,16 +181,14 @@ double LogUniformIntChiSquaredTest::ChiSquaredTestImpl() { const double p = absl::random_internal::ChiSquarePValue(chi_square, dof); if (chi_square > threshold) { - ABSL_INTERNAL_LOG(INFO, "values"); + LOG(INFO) << "values"; for (size_t i = 0; i < buckets.size(); i++) { - ABSL_INTERNAL_LOG(INFO, absl::StrCat(i, ": ", buckets[i])); + LOG(INFO) << i << ": " << buckets[i]; } - ABSL_INTERNAL_LOG(INFO, - absl::StrFormat("trials=%d\n" - "%s(data, %d) = %f (%f)\n" - "%s @ 0.98 = %f", - trials, kChiSquared, dof, chi_square, p, - kChiSquared, threshold)); + LOG(INFO) << "trials=" << trials << "\n" + << kChiSquared << "(data, " << dof << ") = " << chi_square << " (" + << p << ")\n" + << kChiSquared << " @ 0.98 = " << threshold; } return p; } |