mirror of https://github.com/djcb/mu.git
update tests: avoid helgrind warning
Log to the black_hole or helgrind gets unhappy
This commit is contained in:
parent
ec500d3ed4
commit
f83d1b3ed0
|
@ -48,7 +48,7 @@ assert_contacts_equal(const Contacts& contacts,
|
||||||
size_t n{};
|
size_t n{};
|
||||||
for (auto&& contact: contacts) {
|
for (auto&& contact: contacts) {
|
||||||
if (g_test_verbose())
|
if (g_test_verbose())
|
||||||
g_print ("{ \"%s\", \"%s\"},\n", contact.name.c_str(), contact.email.c_str());
|
g_message("{ \"%s\", \"%s\"},\n", contact.name.c_str(), contact.email.c_str());
|
||||||
// assert_equal(contact.name, expected.at(n).first);
|
// assert_equal(contact.name, expected.at(n).first);
|
||||||
// assert_equal(contact.email, expected.at(n).second);
|
// assert_equal(contact.email, expected.at(n).second);
|
||||||
++n;
|
++n;
|
||||||
|
|
|
@ -319,7 +319,6 @@ main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
g_test_init(&argc, &argv, NULL);
|
g_test_init(&argc, &argv, NULL);
|
||||||
|
|
||||||
/* mu_runtime_init/uninit */
|
|
||||||
g_test_add_func("/store/ctor-dtor", test_store_ctor_dtor);
|
g_test_add_func("/store/ctor-dtor", test_store_ctor_dtor);
|
||||||
g_test_add_func("/store/add-count-remove", test_store_add_count_remove);
|
g_test_add_func("/store/add-count-remove", test_store_add_count_remove);
|
||||||
g_test_add_func("/store/message/mailing-list",
|
g_test_add_func("/store/message/mailing-list",
|
||||||
|
@ -329,5 +328,13 @@ main(int argc, char* argv[])
|
||||||
g_test_add_func("/store/index/move",
|
g_test_add_func("/store/index/move",
|
||||||
test_index_move);
|
test_index_move);
|
||||||
|
|
||||||
|
if (!g_test_verbose())
|
||||||
|
g_log_set_handler(
|
||||||
|
NULL,
|
||||||
|
(GLogLevelFlags)(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL |
|
||||||
|
G_LOG_FLAG_RECURSION),
|
||||||
|
(GLogFunc)black_hole,
|
||||||
|
NULL);
|
||||||
|
|
||||||
return g_test_run();
|
return g_test_run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,16 @@ try {
|
||||||
|
|
||||||
g_test_add_func("/query", test_query);
|
g_test_add_func("/query", test_query);
|
||||||
|
|
||||||
|
|
||||||
|
if (!g_test_verbose())
|
||||||
|
g_log_set_handler(
|
||||||
|
NULL,
|
||||||
|
(GLogLevelFlags)(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL |
|
||||||
|
G_LOG_FLAG_RECURSION),
|
||||||
|
(GLogFunc)black_hole,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
|
||||||
return g_test_run();
|
return g_test_run();
|
||||||
|
|
||||||
} catch (const std::runtime_error& re) {
|
} catch (const std::runtime_error& re) {
|
||||||
|
|
Loading…
Reference in New Issue