I don't understand why the SeaBear tests fail... of course commenting
out failing tests is exactly the wrong thing to do. But I'll open an
issue on github instead.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is to avoid confusion with planner.display_deco_mode.
When accessing the "current deco mode" use the decoMode()
helper function.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
We where testing the whole document, wich made qDebug
completely bogus to see where we failed at testing the
generated file. If we test line-by-line, we can know
more easily where we failed.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This finishes the final round of Unittests for the Preferences
now it's time to look for things to fix.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Date loading was incorrect, this unittest + fix deals with that.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is made just to make the tests appear in the same
order of the SettingsObjectWrapper order of initialization.
Since the SettingsObjectWrapper is huge, this helps
checking if everything is correct.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fixes a couple of issues with the tests.
Also, a type in prefs.h is "short" while it's actually
a boolean, this made me write the wrong testcase for this.
Fixed this by setting the Qt wrapper to bool, but I didn't
changed the c implementation because I tought I could break
something.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Biggest test that I created. test all of TecDetails
information. Untested.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And it actually helped me to find a bug. yey.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A few more fixes for things that broke in commit 7be962bfc2 ("Move
subsurface-core to core and qt-mobile to mobile-widgets").
[Dirk Hohndel: slightly edited and overlap with Linus' patch removed]
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I wasn't linking the tests against the qrc library, which made trying to
load the xslt transformation files for the parse test fail.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If the load fails the get_dive(1) could return NULL. Let's catch that as
an error instead of having the test crash.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Besides making it more simple to add a new test now since
you don't need to play hide and seek with the main cmake
this has another good thing: on IDE's that scan the cmake
to create targets on the project tree, the main project
was being popullated with test-targets on the main tree
and not inside the tests directory.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We really should be able to parse the coordinates that we show in our own
HTML export as well as the standard Google format... both have a comma
between the latitude and longitude.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The purpose of testing against known Subsurface runtimes is to warn (when test
is run in verbose mode) if the runtime has altered. Before the next release, we
should update the known Subsurface runtimes to match current behaviour, so we
are alerted when we change something during the next release cycle.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Commit 9d8b0ad introduces the copy_prefs function, and uses it to replace prefs
= default_prefs. We need to include subsurfacestartup.h for it to work in
testplan.cpp, otherwise TestPlan_build fails.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>