| 92 | } // namespace |
| 93 | |
| 94 | TEST(InvalidDynamicsInputs, ZeroMassLeafDoesNotCrash) |
| 95 | { |
| 96 | auto world = World::create(); |
| 97 | auto skeleton = createTwoLinkSkeleton(0.0, 0.0); |
| 98 | world->addSkeleton(skeleton); |
| 99 | |
| 100 | EXPECT_NO_THROW({ |
| 101 | for (int i = 0; i < 5; ++i) { |
| 102 | world->step(); |
| 103 | } |
| 104 | }); |
| 105 | |
| 106 | EXPECT_TRUE(skeleton->getPositions().allFinite()); |
| 107 | EXPECT_TRUE(skeleton->getVelocities().allFinite()); |
| 108 | } |
| 109 | |
| 110 | TEST(InvalidDynamicsInputs, EpsilonMassLeafDoesNotCrash) |
| 111 | { |
nothing calls this directly
no test coverage detected