tests: initialize our prefs to the default values

Otherwise we end up with nonsensical values which lead to a division by zero,
which in return leads to different results, depending on platform.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2021-07-21 13:32:28 -07:00
parent 63e1516579
commit 72bdd506f0
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ void TestMerge::initTestCase()
{
/* we need to manually tell that the resource exists, because we are using it as library. */
Q_INIT_RESOURCE(subsurface);
prefs.cloud_base_url = strdup(default_prefs.cloud_base_url);
copy_prefs(&default_prefs, &prefs);
}
void TestMerge::cleanup()

View file

@ -35,7 +35,7 @@ void TestParse::initTestCase()
{
/* we need to manually tell that the resource exists, because we are using it as library. */
Q_INIT_RESOURCE(subsurface);
prefs.cloud_base_url = strdup(default_prefs.cloud_base_url);
copy_prefs(&default_prefs, &prefs);
}
void TestParse::init()