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
|
@ -110,14 +110,16 @@ void TestQPrefDiveComputer::test_struct_disk()
|
|||
void TestQPrefDiveComputer::test_multiple()
|
||||
{
|
||||
// test multiple instances have the same information
|
||||
auto tst_direct = new qPrefDiveComputer;
|
||||
prefs.dive_computer.download_mode = 57;
|
||||
|
||||
auto tst_direct = new qPrefDiveComputer;
|
||||
|
||||
prefs.dive_computer.download_mode = 25;
|
||||
auto tst = qPrefDiveComputer::instance();
|
||||
prefs.dive_computer.device = copy_qstring("mine");
|
||||
|
||||
QCOMPARE(tst->device(), tst_direct->device());
|
||||
QCOMPARE(tst->device(), QString("mine"));
|
||||
QCOMPARE(tst->download_mode(), tst_direct->download_mode());
|
||||
QCOMPARE(tst->download_mode(), 57);
|
||||
}
|
||||
|
||||
#define TEST(METHOD, VALUE) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue