remove nodiscard warning
This commit is contained in:
@ -126,11 +126,13 @@ TEST(FmtLib, insert_neg_double)
|
|||||||
TEST(FmtLib, int_for_double)
|
TEST(FmtLib, int_for_double)
|
||||||
{
|
{
|
||||||
const double val = -1.5;
|
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)
|
TEST(FmtLib, double_for_int)
|
||||||
{
|
{
|
||||||
const int val = 15;
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user