unit-tests: modernize

Use TempDir, join_paths etc.
This commit is contained in:
Dirk-Jan C. Binnema
2023-09-11 23:48:31 +03:00
parent 567bc001ef
commit af9eb36ca0
6 changed files with 120 additions and 192 deletions

View File

@ -27,17 +27,6 @@
namespace Mu {
/**
* get a dir name for a random temporary directory to do tests
*
* @return a random dir name
*/
std::string test_random_tmpdir(void);
inline gchar* test_mu_common_get_random_tmpdir() {
return g_strdup(test_random_tmpdir().c_str());
}
/**
* mu wrapper for g_test_init. Sets environment variable MU_TEST to 1.
*
@ -46,6 +35,14 @@ inline gchar* test_mu_common_get_random_tmpdir() {
*/
void mu_test_init(int *argc, char ***argv);
/**
* Are we running in a MU_HACKER environment?
*
* @return true or false
*/
bool mu_test_mu_hacker();
/**
* set the timezone
*
@ -62,6 +59,7 @@ const char* set_tz(const char* tz);
*/
bool set_en_us_utf8_locale();
/**
* For unit tests, assert two std::string's are equal.
*