diff --git a/test/printf-test.cc b/test/printf-test.cc index 3e22d467..74a6bd2c 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -38,7 +38,7 @@ using fmt::FormatError; // Returns a number UINT_MAX + 1 formatted as a string. std::string GetBigNumber() { char format[BUFFER_SIZE]; - sprintf(format, "%u", UINT_MAX); + SPrintf(format, "%u", UINT_MAX); Increment(format + 1); return format; } diff --git a/test/util-test.cc b/test/util-test.cc index becd9ff1..af78cd16 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -239,7 +239,7 @@ TEST(UtilTest, FormatWinErrorMessage) { fmt::internal::FormatWinErrorMessage( actual_message, ERROR_FILE_EXISTS, "test"); EXPECT_EQ(fmt::format("test: {}", fmt::str(utf8_message)), - fmt::str(actual_message)); + actual_message.str()); } TEST(UtilTest, WinErrorSink) {