mirror of
https://github.com/boostorg/unordered.git
synced 2025-05-12 05:51:44 +00:00
Generate less output in merge_exception_tests
This commit is contained in:
parent
76e7322262
commit
b95ef6de04
@ -105,4 +105,4 @@ UNORDERED_TEST(merge_exception_test,
|
|||||||
)
|
)
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
RUN_TESTS()
|
RUN_TESTS_QUIET()
|
||||||
|
@ -31,6 +31,14 @@
|
|||||||
return boost::report_errors(); \
|
return boost::report_errors(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define RUN_TESTS_QUIET() \
|
||||||
|
int main(int, char**) \
|
||||||
|
{ \
|
||||||
|
BOOST_UNORDERED_TEST_COMPILER_INFO() \
|
||||||
|
::test::test_list::run_tests(true); \
|
||||||
|
return boost::report_errors(); \
|
||||||
|
}
|
||||||
|
|
||||||
namespace test {
|
namespace test {
|
||||||
struct registered_test_base
|
struct registered_test_base
|
||||||
{
|
{
|
||||||
@ -65,13 +73,20 @@ static inline void add_test(registered_test_base* test)
|
|||||||
last() = test;
|
last() = test;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void run_tests()
|
static inline void run_tests(bool quiet = false)
|
||||||
{
|
{
|
||||||
for (registered_test_base* i = first(); i; i = i->next) {
|
for (registered_test_base* i = first(); i; i = i->next) {
|
||||||
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Running " << i->name << "\n"
|
int error_count = boost::detail::test_errors();
|
||||||
<< std::flush;
|
if (!quiet) {
|
||||||
|
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Running " << i->name << "\n"
|
||||||
|
<< std::flush;
|
||||||
|
}
|
||||||
i->run();
|
i->run();
|
||||||
BOOST_LIGHTWEIGHT_TEST_OSTREAM << std::flush;
|
BOOST_LIGHTWEIGHT_TEST_OSTREAM << std::flush;
|
||||||
|
if (quiet && error_count != boost::detail::test_errors()) {
|
||||||
|
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Error in: " << i->name << "\n"
|
||||||
|
<< std::flush;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user