summaryrefslogtreecommitdiffstats
path: root/dives/test50.xml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-14 18:13:35 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-14 18:13:35 -0800
commita081fb34e001e321308e75f9eb2edc422ba61f8c (patch)
treecc47a30f5d8fa3aabb5e8df5da53a5a6345bfea5 /dives/test50.xml
parent57d5a40e95135958c60f376b69e6c48ef4060706 (diff)
downloadsubsurface-a081fb34e001e321308e75f9eb2edc422ba61f8c.tar.gz
Test dives for duplicate names and conflicting GPS
The conflicting GPS is somewhat artificial. Since the GPS gets parsed first in our syntax, the different GPS location would create a new dive site and we'd end up with two dive sites of the same name with different coordinates. By having a location tag with just the name and no coordinates we make sure that this gets identified with the existing dive site and THEN add the GPS coordinates in the second location tag. This would never happen in a XML file created by Subsurface, but it does a good job in testing the different code paths. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dives/test50.xml')
-rw-r--r--dives/test50.xml28
1 files changed, 28 insertions, 0 deletions
diff --git a/dives/test50.xml b/dives/test50.xml
new file mode 100644
index 000000000..36df5b38e
--- /dev/null
+++ b/dives/test50.xml
@@ -0,0 +1,28 @@
+<divelog program='subsurface' version='2'>
+<settings>
+</settings>
+<dives>
+<dive number='1' date='2015-1-1' time='10:00:00' duration='30:00 min'>
+ <location gps='7.132557 134.224213'>Blue Corner</location>
+ <notes>This dive is at the Blue Corner with the correct coordinates</notes>
+ <divecomputer model='Heinrichs Weikamp OSTC 3' deviceid='01234567' diveid='76543210'>
+ <depth max='30.00 m' mean='17.72 m' />
+ </divecomputer>
+</dive>
+<dive number='2' date='2015-1-2' time='10:00:00' duration='30:00 min'>
+ <location gps='7.132557 134.224213'>Yellow Corner</location>
+ <notes>This dive is at the Yellow Corner but with the coordinates of Blue Corner</notes>
+ <divecomputer model='Heinrichs Weikamp OSTC 3' deviceid='01234567' diveid='76543210'>
+ <depth max='30.00 m' mean='17.72 m' />
+ </divecomputer>
+</dive>
+<dive number='1' date='2015-1-3' time='10:00:00' duration='30:00 min'>
+ <location>Blue Corner</location>
+ <location gps='7.132557 34.224213'>Blue Corner</location>
+ <notes>This dive is at the Blue Corner but the coordinates are wrong. In order to trigger the right behavior here I had to mess with the XML file; it contains two sets of location tags, the first just with the name and only the second then adds the gps coordinates. Otherwise the gps coordinates get parsed first and create a new dive site and we don't even notice the duplicate name.</notes>
+ <divecomputer model='Heinrichs Weikamp OSTC 3' deviceid='01234567' diveid='76543210'>
+ <depth max='30.00 m' mean='17.72 m' />
+ </divecomputer>
+</dive>
+</dives>
+</divelog>