From a6437f4e96421bdd9dfa2ccf781ff37c1350c18c Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 28 Jan 2017 14:51:30 +0000 Subject: [PATCH] More SGPropertyNode::getPositions tests. --- simgear/props/props_test.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/simgear/props/props_test.cxx b/simgear/props/props_test.cxx index 0cc63450..2f61bfbb 100644 --- a/simgear/props/props_test.cxx +++ b/simgear/props/props_test.cxx @@ -304,8 +304,13 @@ test_property_nodes () grandchild = child->getChild("bar", 3, true); grandchild->setDoubleValue(400); + SG_CHECK_EQUAL(grandchild->getPosition(), 3); + child = root.getChild("hack", 0, true); + SG_CHECK_EQUAL(child->getPosition(), 1); + + grandchild = child->getChild("bar", 0, true); grandchild->setDoubleValue(100); grandchild = child->getChild("bar", 3, true); @@ -318,6 +323,10 @@ test_property_nodes () grandchild->setDoubleValue(300); grandchild = child->getChild("bar", 2, true); grandchild->setDoubleValue(400); + + SG_CHECK_EQUAL(grandchild->getPosition(), 3); + + dump_node(&root); SG_CHECK_EQUAL(child->getPosition(), 1);