Skip to content

Commit

Permalink
Fix tests that depend on OpenSim global initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Oct 15, 2024
1 parent fed6dbd commit c9c2621
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/TestOpenSimCreator/MetaTests/TestOpenSimLibraryAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,8 @@ TEST(OpenSimModel, LvalueAssignmentWorksInTrivialCase)
// with something along the lines of "cannot find associated file" or similar.
TEST(OpenSimModel, CanCopyModelContainingExternalLoads)
{
GloballyInitOpenSim();

const std::filesystem::path exampleModel =
std::filesystem::path{OSC_TESTING_RESOURCES_DIR} / "opensim-creator_924_repro.osim";
const std::filesystem::path exampleExternalLoadsFile =
Expand Down
1 change: 1 addition & 0 deletions tests/TestOpenSimCreator/Utils/TestOpenSimHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ TEST(OpenSimHelpers, RecommendedDocumentName_ReturnsUntitledWhenProvidedInMemory

TEST(OpenSimHelpers, RecommendedDocumentName_ReturnsFilenameIfProvidedLoadedModel)
{
GloballyInitOpenSim();
std::filesystem::path modelPath = std::filesystem::path{OSC_TESTING_RESOURCES_DIR} / "models" / "Blank" / "blank.osim";
OpenSim::Model model{modelPath.string()};
ASSERT_EQ(RecommendedDocumentName(model), "blank.osim");
Expand Down

0 comments on commit c9c2621

Please sign in to comment.