Copilot commented on code in PR #3534:
URL: https://github.com/apache/brpc/pull/3534#discussion_r3975749191


##########
test/string_number_conversions_unittest.cc:
##########
@@ -48,9 +48,10 @@ TEST(StringNumberConversionsTest, IntToString) {
 
   for (size_t i = 0; i < arraysize(int_tests); ++i) {
     const IntToStringTest<int>* test = &int_tests[i];
-    EXPECT_EQ(IntToString(test->num), test->sexpected);
+    EXPECT_EQ(std::to_string(test->num), test->sexpected);
     EXPECT_EQ(IntToString16(test->num), UTF8ToUTF16(test->sexpected));
-    EXPECT_EQ(UintToString(test->num), test->uexpected);
+    EXPECT_EQ(std::to_string(static_cast<unsigned>(test->num)),
+              test->uexpected);
     EXPECT_EQ(UintToString16(test->num), UTF8ToUTF16(test->uexpected));

Review Comment:
   `StringNumberConversionsTest.IntToString` no longer tests the public 
`butil::IntToString` / `butil::UintToString` wrappers (it compares against 
`std::to_string` directly). Since those wrappers are intentionally kept for 
compatibility, this reduces coverage and would not catch a future regression in 
the wrapper implementations/signatures.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to