From 6dc1dcaea52e383803a620369567684f553ede80 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 3 Oct 2018 21:45:50 +0200 Subject: Import: pass "downloaded" parameter to process_imported_dives() process_imported_dives() is more efficient for downloaded than for imported (from a file) dives, because it checks only the divecomputer of the first dive. This condition is checked via the "downloaded" flag of the first dive. Instead, pass an argument to process_imported_dives(). Signed-off-by: Berthold Stoeger --- tests/testmerge.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/testmerge.cpp') diff --git a/tests/testmerge.cpp b/tests/testmerge.cpp index a99fd65e7..4559ad9b9 100644 --- a/tests/testmerge.cpp +++ b/tests/testmerge.cpp @@ -23,9 +23,9 @@ void TestMerge::testMergeEmpty() */ struct dive_table table = { 0 }; QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test47.xml", &table), 0); - process_imported_dives(&table, false); + process_imported_dives(&table, false, false); QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test48.xml", &table), 0); - process_imported_dives(&table, false); + process_imported_dives(&table, false, false); QCOMPARE(save_dives("./testmerge47+48.ssrf"), 0); QFile org(SUBSURFACE_TEST_DATA "/dives/test47+48.xml"); org.open(QFile::ReadOnly); @@ -47,9 +47,9 @@ void TestMerge::testMergeBackwards() */ struct dive_table table = { 0 }; QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test48.xml", &table), 0); - process_imported_dives(&table, false); + process_imported_dives(&table, false, false); QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test47.xml", &table), 0); - process_imported_dives(&table, false); + process_imported_dives(&table, false, false); QCOMPARE(save_dives("./testmerge47+48.ssrf"), 0); QFile org(SUBSURFACE_TEST_DATA "/dives/test47+48.xml"); org.open(QFile::ReadOnly); -- cgit v1.2.3-70-g09d2