From edac07554c50a693389e4d88a6d6f56820c940f1 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 29 Sep 2015 12:58:16 -0400 Subject: Make sure we don't create multiple dive sites with the same uuid This shouldn't happen, but in case there is a logic error higher up in the code somewhere, this will prevent it from happening, period. If the code asks for a new dive site with a specific uuid, simply return the existing dive site with that uuid. Signed-off-by: Dirk Hohndel --- tests/testparse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/testparse.cpp b/tests/testparse.cpp index 1a4c0eac5..7a65a0105 100644 --- a/tests/testparse.cpp +++ b/tests/testparse.cpp @@ -83,7 +83,7 @@ void TestParse::testParseDivingLog() // Parsing of DivingLog import from SQLite database sqlite3 *handle; - struct dive_site *ds = alloc_dive_site(0xdeadbeef); + struct dive_site *ds = alloc_or_get_dive_site(0xdeadbeef); ds->name = copy_string("Suomi - - Hälvälä"); QCOMPARE(sqlite3_open(SUBSURFACE_SOURCE "/dives/TestDivingLog4.1.1.sql", &handle), 0); -- cgit v1.2.3-70-g09d2