remove nodiscard warning

This commit is contained in:
alphataubio
2024-08-01 19:55:54 -04:00
parent f62d1b5d55
commit 24fc761396

View File

@ -126,11 +126,13 @@ TEST(FmtLib, insert_neg_double)
TEST(FmtLib, int_for_double)
{
const double val = -1.5;
ASSERT_THROW(fmt::format("word {:d}", val), std::exception);
std::string text;
ASSERT_THROW( text = fmt::format("word {:d}", val), std::exception);
}
TEST(FmtLib, double_for_int)
{
const int val = 15;
ASSERT_THROW(fmt::format("word {:g}", val), std::exception);
std::string text;
ASSERT_THROW( text = fmt::format("word {:g}", val), std::exception);
}