Skip to content

Commit

Permalink
common_test/world_features: don't use TYPED_TEST
Browse files Browse the repository at this point in the history
Minor refactor based on #493.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Nov 2, 2023
1 parent b83354d commit 4e73056
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions test/common_test/world_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,10 @@ using GravityFeatures = gz::physics::FeatureList<
gz::physics::ForwardStep
>;

using GravityFeaturesTestTypes =
::testing::Types<GravityFeatures>;
TYPED_TEST_SUITE(WorldFeaturesTest,
GravityFeatures,);
using WorldFeaturesTestGravity = WorldFeaturesTest<GravityFeatures>;

/////////////////////////////////////////////////
TYPED_TEST(WorldFeaturesTest, GravityFeatures)
TEST_F(WorldFeaturesTestGravity, GravityFeatures)
{
for (const std::string &name : this->pluginNames)
{
Expand Down Expand Up @@ -182,19 +179,18 @@ TYPED_TEST(WorldFeaturesTest, GravityFeatures)
}
}

struct WorldModelFeatureList
: gz::physics::FeatureList<GravityFeatures, gz::physics::WorldModelFeature,
gz::physics::RemoveEntities,
gz::physics::GetNestedModelFromModel,
gz::physics::sdf::ConstructSdfLink,
gz::physics::sdf::ConstructSdfJoint,
gz::physics::sdf::ConstructSdfModel,
gz::physics::sdf::ConstructSdfNestedModel,
gz::physics::ConstructEmptyLinkFeature,
gz::physics::ConstructEmptyNestedModelFeature
>
{
};
using WorldModelFeatureList = gz::physics::FeatureList<
GravityFeatures,
gz::physics::WorldModelFeature,
gz::physics::RemoveEntities,
gz::physics::GetNestedModelFromModel,
gz::physics::sdf::ConstructSdfLink,
gz::physics::sdf::ConstructSdfJoint,
gz::physics::sdf::ConstructSdfModel,
gz::physics::sdf::ConstructSdfNestedModel,
gz::physics::ConstructEmptyLinkFeature,
gz::physics::ConstructEmptyNestedModelFeature
>;

class WorldModelTest : public WorldFeaturesTest<WorldModelFeatureList>
{
Expand Down

0 comments on commit 4e73056

Please sign in to comment.