From 4e68deef809c67ff3d75089d43f0d62017a1122f Mon Sep 17 00:00:00 2001 From: Qyriad Date: Wed, 10 Apr 2024 19:25:30 -0600 Subject: abort with a descriptive message on bad HintFmt usage Change-Id: Ic2f05572042343a8160fd971394372f5f2706fc4 --- tests/unit/libutil/fmt.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/unit/libutil/fmt.cc b/tests/unit/libutil/fmt.cc index 383a688d3..90bcdfbe4 100644 --- a/tests/unit/libutil/fmt.cc +++ b/tests/unit/libutil/fmt.cc @@ -15,9 +15,9 @@ TEST(HintFmt, arg_count) ASSERT_EQ(HintFmt("%1%", "hello").str(), ANSI_MAGENTA "hello" ANSI_NORMAL); // Argument counts are detected at construction. - ASSERT_THROW(HintFmt("%s %s", 1), boost::io::too_few_args); + ASSERT_DEATH(HintFmt("%s %s", 1), "HintFmt received incorrect"); - ASSERT_THROW(HintFmt("%s", 1, 2), boost::io::too_many_args); + ASSERT_DEATH(HintFmt("%s", 1, 2), "HintFmt received incorrect"); } } -- cgit v1.2.3