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>
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>
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 <dirk@hohndel.org>
The VPM-B benchmark results are all based on nominal/zero conservatism, so we
should make sure we use zero conservatism in the tests.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If variables were accidentally carried through from a previous calculated plan,
subsequent plan could be affected. This test aims to detect if this happens.
Commit 8994270 corrected such a bug. If it were reverted, this test would fail
(as it should).
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
From 31e324797c06d366f49db453a67a119819ca8012 Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" <helling@atdotde.de>
Date: Wed, 2 Sep 2015 17:28:12 +0200
Subject: [PATCH] Test that there is a dive
so that the TestGitStorage does not hang when offline.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
... as the former was introduced only in Qt 5.5 in order to make the
test build also with 5.4
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We should compare the calculated runtime against the runtime previously
calculated by Subsurface, expecting them to match exactly, in order to detect if
a change has been made. We still compare against a benchmark, allowing some
difference.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is useful for determining why we calculate a difference profile
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add more VPM-B planner tests. The "expected" total run time is taken as the
total run time produced by the Fortran VPM-B program. For all these tests, the
results are within two minutes, which is a good result, but most are classified
as a "fail".
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>