diff --git a/python/test/pyModel_TEST.py b/python/test/pyModel_TEST.py index ce8d7e5b4..2fcb021df 100644 --- a/python/test/pyModel_TEST.py +++ b/python/test/pyModel_TEST.py @@ -145,6 +145,10 @@ def test_default_construction(self): self.assertEqual(errors[1].message(), "PoseRelativeToGraph error: scope does not point to a valid graph.") + # model dosn't have graphs, so no names should exist in graphs + self.assertFalse(model.name_exists_in_frame_attached_to_graph("")); + self.assertFalse(model.name_exists_in_frame_attached_to_graph("link")); + def test_copy_construction(self): model = Model() diff --git a/python/test/pyWorld_TEST.py b/python/test/pyWorld_TEST.py index 63fe26a01..73947b0a9 100644 --- a/python/test/pyWorld_TEST.py +++ b/python/test/pyWorld_TEST.py @@ -86,6 +86,10 @@ def test_default_construction(self): self.assertEqual(errors[1].message(), "PoseRelativeToGraph error: scope does not point to a valid graph.") + # world dosn't have graphs, so no names should exist in graphs + self.assertFalse(world.name_exists_in_frame_attached_to_graph("")); + self.assertFalse(world.name_exists_in_frame_attached_to_graph("link")); + def test_copy_construction(self): world = World() diff --git a/src/Model_TEST.cc b/src/Model_TEST.cc index 0da219e48..4f1e710cc 100644 --- a/src/Model_TEST.cc +++ b/src/Model_TEST.cc @@ -154,6 +154,10 @@ TEST(DOMModel, Construction) errors[1].Message().find( "PoseRelativeToGraph error: scope does not point to a valid graph")) << errors[1]; + + // model dosn't have graphs, so no names should exist in graphs + EXPECT_FALSE(model.NameExistsInFrameAttachedToGraph("")); + EXPECT_FALSE(model.NameExistsInFrameAttachedToGraph("link")); } ///////////////////////////////////////////////// @@ -229,6 +233,9 @@ TEST(DOMModel, AddLink) EXPECT_EQ(1u, model.LinkCount()); EXPECT_FALSE(model.AddLink(link)); EXPECT_EQ(1u, model.LinkCount()); + // model dosn't have graphs, so no names should exist in graphs + EXPECT_FALSE(model.NameExistsInFrameAttachedToGraph("")); + EXPECT_FALSE(model.NameExistsInFrameAttachedToGraph("link1")); model.ClearLinks(); EXPECT_EQ(0u, model.LinkCount()); diff --git a/src/World_TEST.cc b/src/World_TEST.cc index 88679e4e5..5f912f3c7 100644 --- a/src/World_TEST.cc +++ b/src/World_TEST.cc @@ -93,6 +93,10 @@ TEST(DOMWorld, Construction) EXPECT_NE(std::string::npos, errors[1].Message().find( "PoseRelativeToGraph error: scope does not point to a valid graph")); + + // world dosn't have graphs, so no names should exist in graphs + EXPECT_FALSE(world.NameExistsInFrameAttachedToGraph("")); + EXPECT_FALSE(world.NameExistsInFrameAttachedToGraph("model1")); } ///////////////////////////////////////////////// @@ -384,6 +388,9 @@ TEST(DOMWorld, AddModel) EXPECT_EQ(1u, world.ModelCount()); EXPECT_FALSE(world.AddModel(model)); EXPECT_EQ(1u, world.ModelCount()); + // world dosn't have graphs, so no names should exist in graphs + EXPECT_FALSE(world.NameExistsInFrameAttachedToGraph("")); + EXPECT_FALSE(world.NameExistsInFrameAttachedToGraph("model1")); world.ClearModels(); EXPECT_EQ(0u, world.ModelCount());