From 0c048353d2e7347f148228d785c3f0a8c81e2223 Mon Sep 17 00:00:00 2001 From: Andy Getzendanner Date: Wed, 16 Nov 2022 14:47:18 -0800 Subject: Minor formatting changes in preparation for structured logging... PiperOrigin-RevId: 489044912 Change-Id: I1657dd60bcfa2d0fb4b889f27f4f237325b73f08 --- absl/log/log_format_test.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'absl/log/log_format_test.cc') diff --git a/absl/log/log_format_test.cc b/absl/log/log_format_test.cc index f88650fe..ad426214 100644 --- a/absl/log/log_format_test.cc +++ b/absl/log/log_format_test.cc @@ -26,7 +26,6 @@ #endif #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "absl/log/internal/config.h" #include "absl/log/internal/test_matchers.h" #include "absl/log/log.h" #include "absl/log/scoped_mock_log.h" @@ -612,8 +611,9 @@ TYPED_TEST(FloatingPointLogFormatTest, NegativeNaN) { test_sink, Send(AllOf( TextMessage(MatchesOstream(comparison_stream)), - TextMessage(AnyOf(Eq("-nan"), Eq("nan"), Eq("NaN"), Eq("-nan(ind)"))), - ENCODED_MESSAGE(EqualsProto(R"pb(value { str: "-nan" })pb"))))); + TextMessage(AnyOf(Eq("-nan"), Eq("nan"), Eq("NaN"), + Eq("-nan(ind)"))), ENCODED_MESSAGE(EqualsProto(R"pb(value { str: + "-nan" })pb"))))); test_sink.StartCapturingLogs(); LOG(INFO) << value; @@ -1642,19 +1642,20 @@ TEST(ManipulatorLogFormatTest, IOManipsDoNotAffectAbslStringify) { // Tests that verify the behavior when more data are streamed into a `LOG` // statement than fit in the buffer. -// Structured logging scenario is tested in other unit tests since the output is -// significantly different. +// Structured logging scenario is tested in other unit tests since the output +// is significantly different. TEST(OverflowTest, TruncatesStrings) { absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected); - // This message is too long and should be truncated to some unspecified size - // no greater than the buffer size but not too much less either. It should be - // truncated rather than discarded. + // This message is too long and should be truncated to some unspecified + // size no greater than the buffer size but not too much less either. It + // should be truncated rather than discarded. constexpr size_t buffer_size = 15000; EXPECT_CALL(test_sink, Send(TextMessage( - AllOf(SizeIs(AllOf(Ge(buffer_size - 256), Le(buffer_size))), + AllOf(SizeIs(AllOf(Ge(buffer_size - 256), + Le(buffer_size))), Each(Eq('x')))))); test_sink.StartCapturingLogs(); -- cgit v1.2.3