diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2021-07-21 13:32:28 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-07-23 11:30:17 -0700 |
commit | 72bdd506f07d6a2cc9652efe0353a85d9b8e481a (patch) | |
tree | 08e5a0442d41ee6c4a0a89259988e2ff8db95029 /tests | |
parent | 63e1516579977e68a8cd18c7845682d4655b9677 (diff) | |
download | subsurface-72bdd506f07d6a2cc9652efe0353a85d9b8e481a.tar.gz |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testmerge.cpp | 2 | ||||
-rw-r--r-- | tests/testparse.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/testmerge.cpp b/tests/testmerge.cpp index 238044739..06d82e870 100644 --- a/tests/testmerge.cpp +++ b/tests/testmerge.cpp @@ -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() diff --git a/tests/testparse.cpp b/tests/testparse.cpp index 06eddaa8a..c3446712b 100644 --- a/tests/testparse.cpp +++ b/tests/testparse.cpp @@ -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() |