mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-02 23:20:20 +00:00
41cf83583d
This is a bit painful: since we don't want to modify the filter presets when the user imports (as opposed to opens) a log, we have to provide a table where the parser stores the presets. Calling the parser is getting quite unwieldy, since many tables are passed. We probably should introduce a structure representing a full log-book at one point, which collects all the things that are saved to the log. Apart from that, this is simply the counterpart to saving to XML. The interpretation of the string data is performed by core functions, not the parser itself to avoid code duplication with the git parser. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
14 lines
436 B
C++
14 lines
436 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#include "testdivesiteduplication.h"
|
|
#include "core/dive.h"
|
|
#include "core/divesite.h"
|
|
#include "core/trip.h"
|
|
#include "core/file.h"
|
|
|
|
void TestDiveSiteDuplication::testReadV2()
|
|
{
|
|
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/TwoTimesTwo.ssrf", &dive_table, &trip_table, &dive_site_table, &filter_preset_table), 0);
|
|
QCOMPARE(dive_site_table.nr, 2);
|
|
}
|
|
|
|
QTEST_GUILESS_MAIN(TestDiveSiteDuplication)
|