mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
tests: correct test_multiple in all qPref classes
test_multiple did not test correctly, correct. Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
311b2672da
commit
600da8b9ff
5 changed files with 18 additions and 21 deletions
|
@ -20,7 +20,6 @@ void TestQPrefCloudStorage::test_struct_get()
|
|||
|
||||
auto tst = qPrefCloudStorage::instance();
|
||||
|
||||
prefs.animation_speed = 17;
|
||||
prefs.cloud_base_url = copy_qstring("new url");
|
||||
prefs.cloud_git_url = copy_qstring("new again url");
|
||||
prefs.cloud_storage_email = copy_qstring("myEmail");
|
||||
|
@ -199,13 +198,15 @@ void TestQPrefCloudStorage::test_multiple()
|
|||
{
|
||||
// test multiple instances have the same information
|
||||
|
||||
prefs.animation_speed = 37;
|
||||
prefs.userid = copy_qstring("my user");
|
||||
auto tst_direct = new qPrefCloudStorage;
|
||||
|
||||
prefs.cloud_timeout = 25;
|
||||
auto tst = qPrefCloudStorage::instance();
|
||||
|
||||
QCOMPARE(tst->cloud_timeout(), tst_direct->cloud_timeout());
|
||||
QCOMPARE(tst->userid(), tst_direct->userid());
|
||||
QCOMPARE(tst_direct->cloud_timeout(), 25);
|
||||
}
|
||||
|
||||
#define TEST(METHOD, VALUE) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue