Commit graph

6 commits

Author SHA1 Message Date
Linus Torvalds
62e95fdc86 Save SAC, OTU and CNS in the XML export
We do _not_ read them back, since they are calculated values, although I
guess we could aim to do that too at some point in case we have an
import from somewhere else that has these values but not the profile (or
gas use) to actually calculate them.

Fix test-cases that are checked by TestParse (but nothing else) to match.

Requested-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-05-14 13:27:07 -07:00
Berthold Stoeger
17526ded58 cleanup: move clearing of device nodes to clear_dive_file_data()
It makes no sense to keep the device nodes if all the other data
is cleared. Let's do this automatically and not explicitly.
This ensures that the function is also called on mobile.
Currently it was only called on desktop.

Weirdly, the parser-tests were expecting that the device nodes
were not reset by clear_dive_file_data() and therefore divecomputers
were accumulating in the test results. Thus, the additional
computers had to be removed from the expected test results.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-04-24 10:40:12 -07:00
Berthold Stoeger
b024ca101e Dive site: make UUID generation deterministic
Instead of using a random UUID, use an SHA1 hash of name, description
and notes (if defined). This is necessary for testing.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-12 18:19:07 +03:00
Miika Turkia
0c564a4579 Fix test parsing as new DC appears in the XML files
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27 13:42:10 -08:00
Dirk Hohndel
3f900885df Adjust expected output for TestParse
With commit b26e516e2a ("Dive_sites-Notes shouldn't be stored as
attribute") our output format changed slightly. Adjust the expected output
to match that change to ensure that TestParse passes again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04 13:53:29 +01:00
Miika Turkia
1153f81856 Test case: control log for DLD import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-13 15:27:59 -07:00