2017-04-27 18:21:27 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2015-08-30 17:32:38 +00:00
|
|
|
#include "testdivesiteduplication.h"
|
2020-10-17 10:32:22 +00:00
|
|
|
#include "core/device.h"
|
2016-04-05 17:22:00 +00:00
|
|
|
#include "core/dive.h"
|
|
|
|
#include "core/divesite.h"
|
2019-05-31 14:09:14 +00:00
|
|
|
#include "core/trip.h"
|
2019-03-03 21:29:40 +00:00
|
|
|
#include "core/file.h"
|
2021-04-16 13:47:51 +00:00
|
|
|
#include "core/pref.h"
|
2015-08-30 17:32:38 +00:00
|
|
|
|
|
|
|
void TestDiveSiteDuplication::testReadV2()
|
|
|
|
{
|
2021-04-16 13:47:51 +00:00
|
|
|
prefs.cloud_base_url = strdup(default_prefs.cloud_base_url);
|
2020-10-17 10:32:22 +00:00
|
|
|
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/TwoTimesTwo.ssrf", &dive_table, &trip_table,
|
|
|
|
&dive_site_table, &device_table, &filter_preset_table), 0);
|
2015-08-30 17:32:38 +00:00
|
|
|
QCOMPARE(dive_site_table.nr, 2);
|
|
|
|
}
|
|
|
|
|
2017-02-05 22:26:51 +00:00
|
|
|
QTEST_GUILESS_MAIN(TestDiveSiteDuplication)
|