On 2025-02-07 03:36, Samuel Thibault wrote:
Hello,
Yuqian Yang, le ven. 07 févr. 2025 02:09:25 +0800, a ecrit:
diff --git a/absl/log/log_modifier_methods_test.cc
b/absl/log/log_modifier_methods_test.cc
index 4ccde404..9b6a7ec8 100644
--- a/absl/log/log_modifier_methods_test.cc
+++ b/absl/log/log_modifier_methods_test.cc
@@ -180,7 +180,8 @@ TEST(TailCallsModifiesTest, WithPerror) {
test_sink,
Send(AllOf(TextMessage(AnyOf(Eq("hello world: Bad file number
[9]"),
Eq("hello world: Bad file
descriptor [9]"),
- Eq("hello world: Bad file
descriptor [8]"))),
+ Eq("hello world: Bad file
descriptor [8]"),
+ Eq("hello world: Bad file
descriptor [1073741833]"))),
ENCODED_MESSAGE(HasValues(ElementsAre(
EqualsProto(R"pb(literal: "hello world")pb"),
EqualsProto(R"pb(literal: ": ")pb"),
@@ -188,7 +189,8 @@ TEST(TailCallsModifiesTest, WithPerror) {
EqualsProto(R"pb(str: "Bad file
descriptor")pb")),
EqualsProto(R"pb(literal: " [")pb"),
AnyOf(EqualsProto(R"pb(str: "8")pb"),
- EqualsProto(R"pb(str: "9")pb")),
+ EqualsProto(R"pb(str: "9")pb"),
+ EqualsProto(R"pb(str: "1073741833")pb")),
EqualsProto(R"pb(literal: "]")pb")))))));
Please write our errnos as hexadecimal, they'll be more readable.
It's not OK to use hex here actually. This test is against the log
message
format. By default, the output is handled by `std::ostream` and uses
`std::ios_base::showbase | std::ios_base::boolalpha`. So all numbers are
output as decimals. However, the lib user can change this behavior
simply in
various way.
[1]
https://salsa.debian.org/debian/abseil/-/blob/87ca79e3/absl/log/internal/log_message.cc#L205
--
Yuqian Yang <crup...@crupest.life>