diff --git a/CMakeLists.txt b/CMakeLists.txt index 0818310d7b..3ee0802d32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ endforeach() # Set name for entire project. This establishes the project name in _* variables. # Details at: https://cmake.org/cmake/help/latest/command/project.html#command:project -project(PlayRho VERSION 0.14.0) +project(PlayRho VERSION 1.0.0) # Now PlayRho_VERSION set to version above. # PlayRho_VERSION_MAJOR set to first component. # PlayRho_VERSION_MINOR set to second component. diff --git a/UnitTests/PrismaticJoint.cpp b/UnitTests/PrismaticJoint.cpp index d217d6c0ef..2af122a07a 100644 --- a/UnitTests/PrismaticJoint.cpp +++ b/UnitTests/PrismaticJoint.cpp @@ -378,3 +378,21 @@ TEST(PrismaticJointConf, GetName) { EXPECT_STREQ(GetName(GetTypeID()), "d2::PrismaticJointConf"); } + +TEST(PrismaticJointConf, GetPrismaticJointConf) +{ + auto conf = PrismaticJointConf{}; + conf.bodyA = BodyID{21u}; + conf.bodyB = BodyID{39u}; + conf.localAnchorA = Length2(4_m, 5_m); + conf.localAnchorB = Length2(6_m, 7_m); + conf.enableLimit = true; + conf.lowerTranslation = 3_m; + conf.upperTranslation = 44_m; + auto result = PrismaticJointConf{}; + EXPECT_NO_THROW(result = GetPrismaticJointConf(Joint{conf})); + EXPECT_EQ(conf.bodyA, result.bodyA); + EXPECT_EQ(conf.bodyB, result.bodyB); + EXPECT_EQ(conf.collideConnected, result.collideConnected); + EXPECT_EQ(conf.enableLimit, result.enableLimit); +}