aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)Author
2015-07-06Fix typo in test and some numbersGravatar Robert C. Helling
With these values I reproduce the runtimes from the UI. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-05Adapt the test to the API changeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-05Add simple test for the dive plannerGravatar Dirk Hohndel
This sets up a standard dive scenario (30 minutes at 260ft/79m, EAN36 and Oxygen as deco gases, last stop at 20ft/6m) and calls the planner to set up a dive plan given certain standard gases. Instead of trying to verify the complete plans it checks that we switch to the deco gases at the right depth and the complete duration of the dive matches our expectation. The test intentionally fails right now for imperial as we have the wrong switch depth for Oxygen. See how useful tests are? On the downside, the test does NOT produce the same plan as Subsurface when I try to create a consistent setup for both - and I have not been able to figure out why. There must be some other parameters that I'm not setting, but I haven't identified them, yet. It's very small differences, for example in the metric case the stops at 21m, 9m, and 6m are each one minute shorter in the test than it what Subsurface calculates. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Remove all the no longer necessary code that aborts read of first V2 fileGravatar Dirk Hohndel
This was a poorly implemented hack when we executed the reverse geo lookup in the main thread and opening a V2 file could take a very long time. We need to do the "Welcome" message quite differently. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24Adapt CSV test to include suitGravatar Dirk Hohndel
Also fixed it to correctly parse the mean depth (duh, a test that had a bug) and added a buddy field for good measure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24Add suit field for CSV importGravatar Miika Turkia
Fixes #853 [Dirk Hohndel: fixed test compile] Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Some simple test for file parsingGravatar Dirk Hohndel
With no V2 question shown - parsing fails when a V2 file is loaded - parsing succeeds when a V3 file is loaded - import of CSV file succeeds With V2 question shown - parsing succeeds when a V2 file is loaded Finally compare the output of reading in the various files with reference output included in the sources. My guess is that this test might be a bit fragile, but hey, it's a start. (reminder: the tests only get built when using cmake) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23Add support for more GPS coordinate formats.Gravatar Patrick Valsecchi
As requested in the user forum and in the mailing list, now support: - 46.473881 6.784696 (format used in XML files) - 48 51.491n 2 17.677e I was not able to handle the XML format in a generic way without making the code too ugly. So I've added an exception. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-04More tolerant when parsing GPS coordinates.Gravatar Patrick Valsecchi
Refactored the parsing logic to make it more solid (no more guessing) and more flexible (support more formats). Added a test for checking that. Fixed a few warnings. [Dirk Hohndel: some changes to coding style] Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17Moved code around to make possible to compile the C part alone.Gravatar Tomaz Canabrava
The C code should be compilable without the need to compile the Gui part, too. This is expecially good for unit testing as we can test all the algorithms without a window appearing out of nowhere. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-16Test cases for unit conversionGravatar Lakshman
Added more test cases for unit conversion Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-15Corrections to unit testsGravatar Lakshman
Make the initial unit tests actually pass Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14First test case implemented.Gravatar Tomaz Canabrava
This is just a stub test case to show how a test case should be implemented. every 'private slot' on the test classes will be automatically executed when you run 'make test' on the terminal, and a report will be generated with a failure / success. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>