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
|
@ -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) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue