tests: update test helpers and users

Move test-mu-common to mu-test-utils. Use mu_test_init as a wrapper for
g_test_init. Update users.
This commit is contained in:
Dirk-Jan C. Binnema
2022-08-10 08:20:58 +03:00
parent 3ba2c4ea08
commit 11389247c5
33 changed files with 355 additions and 406 deletions

View File

@ -30,7 +30,7 @@
#include "index/mu-indexer.hh"
#include "utils/mu-result.hh"
#include "utils/mu-utils.hh"
#include "test-mu-common.hh"
#include "utils/mu-test-utils.hh"
using namespace Mu;
@ -87,20 +87,10 @@ test_query()
int
main(int argc, char* argv[])
try {
g_test_init(&argc, &argv, NULL);
mu_test_init(&argc, &argv);
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();
} catch (const std::runtime_error& re) {