Commit graph

20 commits

Author SHA1 Message Date
Miika Turkia
75f3cb2027 Test case for multicylinder support on CSV import
Test for importing Subsurface generated CSV dive details, with multiple
cylinders support.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26 11:33:10 -07:00
Dirk Hohndel
afe7e847d6 Whitespace cleanup tests
Again, entirely script based.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-26 16:32:51 +03:00
Miika Turkia
fbbca93d53 Add test for DL7 import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-01-08 06:06:12 +02:00
Miika Turkia
e17ad1b0e0 Add test for DM5 import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27 13:42:10 -08:00
Miika Turkia
726c9e859c Test case for CSV profile export to imperial and back
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-12 14:05:33 -07:00
Miika Turkia
e52d9c2846 Add UDDF export-import test
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-06 08:06:42 -07:00
Dirk Hohndel
ee1bf18189 Add SPDX header to tests
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Miika Turkia
acd791b7c1 Export-import test for manual CSV
Note that the actual validation of the result is currently disabled, so
the tests will pass even though there are some bugs and rounding errors
present.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-04-01 08:06:09 -07:00
Miika Turkia
a0ed0ff823 Change parseCSV to support unit and file selection
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-04-01 08:06:09 -07:00
Jeremie Guichard
b9a3dfb86b Rework TestParse to make tests independent from each other
In the original version, parsing and comparing output was
done in separate test methods. This was forbidding use of
QTest cleanup to call clear_dive_file_data().
As a side effect a failure in one test would make other tests
failing too (since call to clear_dive_file_data was skipped
by QCOMPARE failure).

Added a FILE_COMPARE macro to avoid code duplication.

Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-04 12:03:33 -08:00
Dirk Hohndel
ec20d36f3c Add test for merging multiple cylinders
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-09 22:22:12 -08:00
Tomaz Canabrava
27b4ef321a Correctly open the resource file
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27 08:27:21 -08:00
Miika Turkia
1e8ea9061e Test case: compare DLD log with a saved one
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-13 15:28:04 -07:00
Miika Turkia
0160e58e7d Test case: reading zip and DLD parsing
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-13 15:27:54 -07:00
Miika Turkia
96b612941e Test case: Seabear new format
This validates Seabear import from H3 and T1 dive computers that use new
CSV format to store the logs. The fields wary depending on the dive
mode, thus we need to parse the field configuration during import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-28 08:47:05 -07:00
Miika Turkia
80fe9f8c0d Test case: HUDC import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-27 06:35:19 -07:00
Miika Turkia
5d4f81206d Test DM4 import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26 09:14:12 -07:00
Miika Turkia
c19f4869af Create test case for DivingLog SQLite import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24 13:21:19 -07:00
Dirk Hohndel
ccc9d80015 Remove all the no longer necessary code that aborts read of first V2 file
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-06-16 14:41:56 -07:00
Dirk Hohndel
b47d8d5992 Some simple test for file parsing
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-03-14 18:15:08 -07:00