subsurface/tests
Dirk Hohndel 9d8b0addf9 Correctly copy preferences
When just assigning one structure to the other we copy the string
pointers. If we then modify those strings in the copy, we happily free
the strings of the original. And then resetting the preferences equally
happily reused those strings, pointing to long since freed memory.

I think what I did now is excessive for the current use case in that it
copies a ton of strings that are unset in the default_prefs. But I figured
this is a rarely used function and I might as well do it correctly.

Also, once we implement multi user support with per user preferences we
will be copying completely populated preferences around (at least that's
my guess).

Fixes #940

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06 10:19:43 +01:00
..
testdivesiteduplication.cpp Add test for dive site duplication bug 2015-08-30 10:32:38 -07:00
testdivesiteduplication.h Add test for dive site duplication bug 2015-08-30 10:32:38 -07:00
testgitstorage.cpp Correctly copy preferences 2015-10-06 10:19:43 +01:00
testgitstorage.h Add test case for multi line dive notes merging 2015-08-30 13:00:32 -07:00
testgpscoords.cpp Add support for more GPS coordinate formats. 2015-02-23 05:37:34 -08:00
testgpscoords.h Add support for more GPS coordinate formats. 2015-02-23 05:37:34 -08:00
testparse.cpp Make sure we don't create multiple dive sites with the same uuid 2015-09-29 12:58:16 -04:00
testparse.h Test case: compare DLD log with a saved one 2015-09-13 15:28:04 -07:00
testplan.cpp Correctly copy preferences 2015-10-06 10:19:43 +01:00
testplan.h TestPlan: Add test for repeating dive 2015-09-22 07:36:37 -07:00
testprofile.cpp Moved code around to make possible to compile the C part alone. 2014-04-17 08:46:29 -07:00
testprofile.h Moved code around to make possible to compile the C part alone. 2014-04-17 08:46:29 -07:00
testrenumber.cpp Add test for import, merge and renumbering 2015-10-05 16:35:09 +01:00
testrenumber.h Add test for import, merge and renumbering 2015-10-05 16:35:09 +01:00
testunitconversion.cpp Moved code around to make possible to compile the C part alone. 2014-04-17 08:46:29 -07:00
testunitconversion.h First test case implemented. 2014-04-14 11:49:49 -07:00