2017-04-27 20:21:27 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2015-08-30 10:32:38 -07:00
|
|
|
#include "testdivesiteduplication.h"
|
2020-10-17 12:32:22 +02:00
|
|
|
#include "core/device.h"
|
2016-04-05 14:22:00 -03:00
|
|
|
#include "core/dive.h"
|
|
|
|
#include "core/divesite.h"
|
2019-05-31 16:09:14 +02:00
|
|
|
#include "core/trip.h"
|
2019-03-03 22:29:40 +01:00
|
|
|
#include "core/file.h"
|
2021-04-16 06:47:51 -07:00
|
|
|
#include "core/pref.h"
|
2015-08-30 10:32:38 -07:00
|
|
|
|
|
|
|
void TestDiveSiteDuplication::testReadV2()
|
|
|
|
{
|
2021-04-16 06:47:51 -07:00
|
|
|
prefs.cloud_base_url = strdup(default_prefs.cloud_base_url);
|
2020-10-17 12:32:22 +02: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 10:32:38 -07:00
|
|
|
QCOMPARE(dive_site_table.nr, 2);
|
|
|
|
}
|
|
|
|
|
2017-02-05 23:26:51 +01:00
|
|
|
QTEST_GUILESS_MAIN(TestDiveSiteDuplication)
|