aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)Author
2017-02-21Test for basic image handlingGravatar Robert C. Helling
This tests adding image files to dives including hashing and evaluating exif data. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-19Fix typo in saturation/desatureation ratesGravatar Robert C. Helling
This patch eliminates the difference between the saturation and desaturation rates. This was probably once meant as a conservative measure but the desaturation rate was increased rather than the saturation rate (which is probably a typo, as reported by Stefan). Since there is no good basis for this anyway, this patch sets both factors to 1.0 (and if accepted the whole factor business should be removed). This makes our deco times slightly longer. But in the past, we had introduced a 1.2% fudge factor in the critical radius calculation to add conservatism and match the benchmark better. Removing this fudge factor brings us close to the benchmarks. Expected test values updated. Reported-by: Stefan <sjti@gmx.net> Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-11Set up gaslist only in the beginning of diveplanGravatar Robert C. Helling
In the beginning of the diveplan, divedatapoints of zero duration indicate available gases with the depth giving the suggested switch depth. Zero-duration datapoints in the middle of the dive do not have this meaning and should thus be ignored when composing the gaslist. The tests should have these gas defining segments in the beginning. This fixes a problem when replanning a dive that would change to random gases during deco. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-09Add test for merging multiple cylindersGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-09Reenable all of TestParseGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-09Fix dive number comparison for Seabear import testsGravatar Miika Turkia
2017-02-09Add numberField parameter for parse testingGravatar Miika Turkia
2017-02-09Fix typo on parse testingGravatar Miika Turkia
2017-02-07travis: Run a xfvb for TestPreferencesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06On Travis, don't run TestPreferencesGravatar Dirk Hohndel
... because that one needs a display to run. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06TestParse: disable failing testsGravatar Dirk Hohndel
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>
2017-02-06TestParse: prevent crashesGravatar Dirk Hohndel
Two CSV imports are failing right now; we shouldn't access uninitialized memory when that happens. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-05TestParse: make sure we get one dive from SeabearHUDCGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-05TestPreferences needs GUI environmentGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-05Our tests are actually GUILESSGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-06Rename prefs.deco_mode to prefs.planner_deco_modeGravatar Robert C. Helling
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>
2016-12-27Test line-by-line for equality on TestGravatar Tomaz Canabrava
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>
2016-12-27Correctly open the resource fileGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-01Preferences tests: remove comments, move codeGravatar Tomaz Canabrava
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>
2016-11-01Preferences tests: fix Update Manager date loadingGravatar Tomaz Canabrava
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>
2016-11-01Preferences tests: location updates & bug fixGravatar Tomaz Canabrava
Fixed loading the location preferences. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-01Preferences tests: move animation_settings to the bottom of test fileGravatar Tomaz Canabrava
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>
2016-10-28Fix default file behavior testsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-18Added language testcaseGravatar Tomaz Canabrava
Also, added a missing method / property Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-18Testcases for display settingsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-18Add general settings unittestsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-18Tests for Units PreferencesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Make all current written tests passGravatar Tomaz Canabrava
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>
2016-10-15Update a few tests, implement PlannerGravatar Tomaz Canabrava
Also, fixed a typo that caused a bug. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Test planner settingsGravatar Tomaz Canabrava
Plus: fix a typo. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Tests for Proxy preferencesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Test geologationGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Test the facebook preferencesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Save tests for Partial Pressure GasGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Test TecDetailsGravatar Tomaz Canabrava
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>
2016-10-15Finish vendor testingGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-24Rename conservatism_level to vpmb_conservatismGravatar Rick Walsh
Make the variable purpose less ambiguous Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-21Beginning of the DiveComputer unittests.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-21Finished unittest for cloud storage.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-28Settings update: Fix git_local_only loadingGravatar Tomaz Canabrava
Thanks to the unittesting. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-28Add the beginning of the Preferences testGravatar Tomaz Canabrava
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>
2016-08-28Add renumber test as a dependency for running the testsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-07-09Update TestPlan for divedatapoint storing cylinder id instead of gasmixGravatar Rick Walsh
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05Fix compilation with the new folder architectureGravatar Tomaz Canabrava
A few more fixes for things that broke in commit 7be962bfc287 ("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>
2016-03-24Fix tests linkageGravatar Tomaz Canabrava
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>
2016-03-23Prevent possible SIGSEGV in testGravatar Dirk Hohndel
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>
2016-03-09Silence warnings in testplan.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in testparse.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07Fix annoyances on file.cGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-01Silence compiler warningsGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>