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:
jan Iversen 2018-07-28 17:21:51 +02:00 committed by Dirk Hohndel
parent 311b2672da
commit 600da8b9ff
5 changed files with 18 additions and 21 deletions

View file

@ -48,13 +48,16 @@ void TestQPrefFacebook::test_multiple()
{
// test multiple instances have the same information
prefs.facebook.access_token = copy_qstring("test 1");
auto tst_direct = new qPrefFacebook;
prefs.facebook.access_token = copy_qstring("test 1");
prefs.facebook.access_token = copy_qstring("test 2");
auto tst = qPrefFacebook::instance();
prefs.facebook.album_id = copy_qstring("test 2");
QCOMPARE(tst->access_token(), tst_direct->access_token());
QCOMPARE(tst->access_token(), QString("test 1"));
QCOMPARE(tst->album_id(), tst_direct->album_id());
QCOMPARE(tst->album_id(), QString("test 2"));
}
#define TEST(METHOD, VALUE) \