Skip to content

Commit

Permalink
Remove variable deprecation, revert root_dom integration test
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Brawner <[email protected]>
  • Loading branch information
brawner committed Jan 8, 2021
1 parent f1a4887 commit c94f4ef
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Root.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ class sdf::RootPrivate

/// \brief The models specified under the root SDF element
/// Deprecated: to be removed in libsdformat12
public: std::vector<sdf::Model> models SDF_DEPRECATED(11.0);
public: std::vector<sdf::Model> models;

/// \brief The lights specified under the root SDF element
/// Deprecated: to be removed in libsdformat12
public: std::vector<sdf::Light> lights SDF_DEPRECATED(11.0);
public: std::vector<sdf::Light> lights;

/// \brief The actors specified under the root SDF element
/// Deprecated: to be removed in libsdformat12
public: std::vector<sdf::Actor> actors SDF_DEPRECATED(11.0);
public: std::vector<sdf::Actor> actors;

/// \brief Frame Attached-To Graphs constructed when loading Worlds.
public: std::vector<sdf::ScopedGraph<FrameAttachedToGraph>>
Expand Down
18 changes: 18 additions & 0 deletions test/integration/root_dom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ TEST(DOMRoot, LoadMultipleModels)
EXPECT_TRUE(errors.empty()) << errors;
ASSERT_NE(nullptr, root.Model());
EXPECT_EQ("robot1", root.Model()->Name());

SDF_SUPPRESS_DEPRECATED_BEGIN
EXPECT_EQ(3u, root.ModelCount());

EXPECT_EQ("robot1", root.ModelByIndex(0)->Name());
EXPECT_EQ("robot2", root.ModelByIndex(1)->Name());
EXPECT_EQ("last_robot", root.ModelByIndex(2)->Name());

EXPECT_FALSE(root.ModelNameExists("robot"));
EXPECT_TRUE(root.ModelNameExists("robot1"));
EXPECT_TRUE(root.ModelNameExists("robot2"));
EXPECT_TRUE(root.ModelNameExists("last_robot"));
SDF_SUPPRESS_DEPRECATED_END
}

/////////////////////////////////////////////////
Expand All @@ -105,4 +118,9 @@ TEST(DOMRoot, LoadDuplicateModels)
EXPECT_FALSE(errors.empty());
EXPECT_NE(nullptr, root.Model());
EXPECT_EQ("robot1", root.Model()->Name());

SDF_SUPPRESS_DEPRECATED_BEGIN
EXPECT_EQ(1u, root.ModelCount());
EXPECT_EQ("robot1", root.ModelByIndex(0)->Name());
SDF_SUPPRESS_DEPRECATED_END
}

0 comments on commit c94f4ef

Please sign in to comment.