aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/testgitstorage.cpp24
-rw-r--r--tests/testmerge.cpp8
-rw-r--r--tests/testrenumber.cpp6
3 files changed, 19 insertions, 19 deletions
diff --git a/tests/testgitstorage.cpp b/tests/testgitstorage.cpp
index 5184aeb2a..f9e3e2d6c 100644
--- a/tests/testgitstorage.cpp
+++ b/tests/testgitstorage.cpp
@@ -137,9 +137,9 @@ void TestGitStorage::testGitStorageCloudOfflineSync()
// read the local repo from the previous test and add dive 10
QCOMPARE(parse_file(qPrintable(localCacheRepo), &dive_table), 0);
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test10.xml", &dive_table), 0);
- // calling process_dive() sorts the table, but calling it with
- // is_imported == true causes it to try to update the window title... let's not do that
- process_dives(false, false);
+ // calling process_loaded_dives() sorts the table, but calling process_imported_dives()
+ // causes it to try to update the window title... let's not do that
+ process_loaded_dives();
// now save only to the local cache but not to the remote server
QCOMPARE(save_dives(qPrintable(localCacheRepo)), 0);
QCOMPARE(save_dives("./SampleDivesV3plus10local.ssrf"), 0);
@@ -186,14 +186,14 @@ void TestGitStorage::testGitStorageCloudMerge()
QString localCacheRepoSave = localCacheDir + "save[ssrftest@hohndel.org]";
QCOMPARE(parse_file(qPrintable(localCacheRepoSave), &dive_table), 0);
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test11.xml", &dive_table), 0);
- process_dives(false, false);
+ process_loaded_dives();
QCOMPARE(save_dives(qPrintable(localCacheRepoSave)), 0);
clear_dive_file_data();
// now we open the cloud storage repo and add a different dive to it
QCOMPARE(parse_file(qPrintable(cloudTestRepo), &dive_table), 0);
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test12.xml", &dive_table), 0);
- process_dives(false, false);
+ process_loaded_dives();
QCOMPARE(save_dives(qPrintable(cloudTestRepo)), 0);
clear_dive_file_data();
@@ -208,9 +208,9 @@ void TestGitStorage::testGitStorageCloudMerge()
clear_dive_file_data();
QCOMPARE(parse_file("./SampleDivesV3plus10local.ssrf", &dive_table), 0);
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test11.xml", &dive_table), 0);
- process_dives(false, false);
+ process_loaded_dives();
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test12.xml", &dive_table), 0);
- process_dives(false, false);
+ process_loaded_dives();
QCOMPARE(save_dives("./SampleDivesV3plus10-11-12.ssrf"), 0);
QFile org("./SampleDivesV3plus10-11-12-merged.ssrf");
org.open(QFile::ReadOnly);
@@ -232,7 +232,7 @@ void TestGitStorage::testGitStorageCloudMerge2()
QString localCacheDir(get_local_dir("https://cloud.subsurface-divelog.org/git/ssrftest@hohndel.org", "ssrftest@hohndel.org"));
QString localCacheRepo = localCacheDir + "[ssrftest@hohndel.org]";
QCOMPARE(parse_file(qPrintable(localCacheRepo), &dive_table), 0);
- process_dives(false, false);
+ process_loaded_dives();
struct dive *dive = get_dive(1);
delete_single_dive(1);
QCOMPARE(save_dives("./SampleDivesMinus1.ssrf"), 0);
@@ -248,7 +248,7 @@ void TestGitStorage::testGitStorageCloudMerge2()
}
// now we open the cloud storage repo and modify that first dive
QCOMPARE(parse_file(qPrintable(cloudTestRepo), &dive_table), 0);
- process_dives(false, false);
+ process_loaded_dives();
dive = get_dive(1);
QVERIFY(dive != NULL);
free(dive->notes);
@@ -288,7 +288,7 @@ void TestGitStorage::testGitStorageCloudMerge3()
QString localCacheDir(get_local_dir("https://cloud.subsurface-divelog.org/git/ssrftest@hohndel.org", "ssrftest@hohndel.org"));
QString localCacheRepo = localCacheDir + "[ssrftest@hohndel.org]";
QCOMPARE(parse_file(qPrintable(cloudTestRepo), &dive_table), 0);
- process_dives(false, false);
+ process_loaded_dives();
struct dive *dive = get_dive(0);
QVERIFY(dive != 0);
dive->notes = strdup("Create multi line dive notes\nLine 2\nLine 3\nLine 4\nLine 5\nThat should be enough");
@@ -300,7 +300,7 @@ void TestGitStorage::testGitStorageCloudMerge3()
clear_dive_file_data();
QCOMPARE(parse_file(qPrintable(localCacheRepo), &dive_table), 0);
- process_dives(false, false);
+ process_loaded_dives();
dive = get_dive(0);
dive->notes = strdup("Create multi line dive notes\nDifferent line 2 and removed 3-5\n\nThat should be enough");
dive = get_dive(1);
@@ -319,7 +319,7 @@ void TestGitStorage::testGitStorageCloudMerge3()
}
// now we open the cloud storage repo and modify those first dive notes differently
QCOMPARE(parse_file(qPrintable(cloudTestRepo), &dive_table), 0);
- process_dives(false, false);
+ process_loaded_dives();
dive = get_dive(0);
dive->notes = strdup("Completely different dive notes\nBut also multi line");
dive = get_dive(1);
diff --git a/tests/testmerge.cpp b/tests/testmerge.cpp
index b102e239f..50bfd6e50 100644
--- a/tests/testmerge.cpp
+++ b/tests/testmerge.cpp
@@ -22,9 +22,9 @@ void TestMerge::testMergeEmpty()
* check that we correctly merge mixed cylinder dives
*/
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test47.xml", &dive_table), 0);
- process_dives(true, false);
+ process_imported_dives(false);
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test48.xml", &dive_table), 0);
- process_dives(true, false);
+ process_imported_dives(false);
QCOMPARE(save_dives("./testmerge47+48.ssrf"), 0);
QFile org(SUBSURFACE_TEST_DATA "/dives/test47+48.xml");
org.open(QFile::ReadOnly);
@@ -45,9 +45,9 @@ void TestMerge::testMergeBackwards()
* check that we correctly merge mixed cylinder dives
*/
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test48.xml", &dive_table), 0);
- process_dives(true, false);
+ process_imported_dives(false);
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test47.xml", &dive_table), 0);
- process_dives(true, false);
+ process_imported_dives(false);
QCOMPARE(save_dives("./testmerge47+48.ssrf"), 0);
QFile org(SUBSURFACE_TEST_DATA "/dives/test47+48.xml");
org.open(QFile::ReadOnly);
diff --git a/tests/testrenumber.cpp b/tests/testrenumber.cpp
index f6a628083..54d689004 100644
--- a/tests/testrenumber.cpp
+++ b/tests/testrenumber.cpp
@@ -8,14 +8,14 @@
void TestRenumber::setup()
{
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test47.xml", &dive_table), 0);
- process_dives(false, false);
+ process_loaded_dives();
dive_table.preexisting = dive_table.nr;
}
void TestRenumber::testMerge()
{
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test47b.xml", &dive_table), 0);
- process_dives(true, false);
+ process_imported_dives(false);
QCOMPARE(dive_table.nr, 1);
QCOMPARE(unsaved_changes(), 1);
mark_divelist_changed(false);
@@ -25,7 +25,7 @@ void TestRenumber::testMerge()
void TestRenumber::testMergeAndAppend()
{
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test47c.xml", &dive_table), 0);
- process_dives(true, false);
+ process_imported_dives(false);
QCOMPARE(dive_table.nr, 2);
QCOMPARE(unsaved_changes(), 1);
struct dive *d = get_dive(1);