-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This cleans up physics tests in a few ways: Consolidate TestUtilities.hh and test/Utils.hh Move test headers to test/include/test Move mock headers to test/include/mock Create an INTERFACE library for test/mock headers that sets common compiler definitions as well as common libraries to link against Remove all instances of hardcoded world names or resource names and instead use constants. Signed-off-by: Michael Carroll <[email protected]>
- Loading branch information
Showing
68 changed files
with
399 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright (C) 2024 Open Source Robotics Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
#ifndef DARTSIM_WORLDS_HH_ | ||
#define DARTSIM_WORLDS_HH_ | ||
|
||
#include <gz/common/testing/TestPaths.hh> | ||
|
||
#include <string> | ||
|
||
inline std::string DartsimTestWorld(const std::string &_world) | ||
{ | ||
return gz::common::testing::TestFile("dartsim", "worlds", _world); | ||
} | ||
|
||
namespace dartsim::worlds | ||
{ | ||
const auto kAddedMassSdf = DartsimTestWorld("added_mass.sdf"); | ||
const auto kEmptySdf = DartsimTestWorld("empty.sdf"); | ||
const auto kFallingWorld = DartsimTestWorld("falling.world"); | ||
const auto kJointAcrossNestedModelsSdf = | ||
DartsimTestWorld("joint_across_nested_models.sdf"); | ||
const auto kModelFramesSdf = DartsimTestWorld("kModelFrames.sdf"); | ||
const auto kShapesWorld = DartsimTestWorld("shapes.world"); | ||
const auto kShapesBitmaskWorld = DartsimTestWorld("shapes_bitmask.sdf"); | ||
const auto kTestWorld = DartsimTestWorld("test.world"); | ||
const auto kWorldFramesSdf = DartsimTestWorld("world_frames.sdf"); | ||
const auto kWorldWithNestedModelSdf = | ||
DartsimTestWorld("world_with_nested_model.sdf"); | ||
const auto kWorldWithNestedModelJointToWorldSdf = | ||
DartsimTestWorld("world_with_nested_model_joint_to_world.sdf"); | ||
|
||
} // namespace dartsim::worlds | ||
#endif // DARTSIM_WORLDS_HH_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.