https://gitlab.com/OpenMW/openmw/-/merge_requests/253 --- a/apps/openmw_test_suite/detournavigator/navigator.cpp 2020-06-30 16:07:31.544410916 +0100 +++ b/apps/openmw_test_suite/detournavigator/navigator.cpp 2020-06-30 16:08:50.405698937 +0100 @@ -458,25 +458,25 @@ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd, Flag_swim, mAreaCosts, mOut), Status::Success); - EXPECT_EQ(mPath, std::deque({ - osg::Vec3f(0, 215, 185.33331298828125), - osg::Vec3f(0, 186.6666717529296875, 185.33331298828125), - osg::Vec3f(0, 158.333343505859375, 185.33331298828125), - osg::Vec3f(0, 130.0000152587890625, 185.33331298828125), - osg::Vec3f(0, 101.66667938232421875, 185.33331298828125), - osg::Vec3f(0, 73.333343505859375, 185.33331298828125), - osg::Vec3f(0, 45.0000152587890625, 185.33331298828125), - osg::Vec3f(0, 16.6666812896728515625, 185.33331298828125), - osg::Vec3f(0, -11.66664981842041015625, 185.33331298828125), - osg::Vec3f(0, -39.999980926513671875, 185.33331298828125), - osg::Vec3f(0, -68.33331298828125, 185.33331298828125), - osg::Vec3f(0, -96.66664886474609375, 185.33331298828125), - osg::Vec3f(0, -124.99997711181640625, 185.33331298828125), - osg::Vec3f(0, -153.33331298828125, 185.33331298828125), - osg::Vec3f(0, -181.6666412353515625, 185.33331298828125), - osg::Vec3f(0, -209.999969482421875, 185.33331298828125), - osg::Vec3f(0, -215, 185.33331298828125), - })) << mPath; + EXPECT_THAT(mPath, ElementsAre( + Vec3fEq(0, 215, 185.33331298828125), + Vec3fEq(0, 186.6666717529296875, 185.33331298828125), + Vec3fEq(0, 158.333343505859375, 185.33331298828125), + Vec3fEq(0, 130.0000152587890625, 185.33331298828125), + Vec3fEq(0, 101.66667938232421875, 185.33331298828125), + Vec3fEq(0, 73.333343505859375, 185.33331298828125), + Vec3fEq(0, 45.0000152587890625, 185.33331298828125), + Vec3fEq(0, 16.6666812896728515625, 185.33331298828125), + Vec3fEq(0, -11.66664981842041015625, 185.33331298828125), + Vec3fEq(0, -39.999980926513671875, 185.33331298828125), + Vec3fEq(0, -68.33331298828125, 185.33331298828125), + Vec3fEq(0, -96.66664886474609375, 185.33331298828125), + Vec3fEq(0, -124.99997711181640625, 185.33331298828125), + Vec3fEq(0, -153.33331298828125, 185.33331298828125), + Vec3fEq(0, -181.6666412353515625, 185.33331298828125), + Vec3fEq(0, -209.999969482421875, 185.33331298828125), + Vec3fEq(0, -215, 185.33331298828125) + )); } TEST_F(DetourNavigatorNavigatorTest, path_should_be_over_water_when_ground_cross_water_with_swim_and_walk_flags) @@ -505,25 +505,25 @@ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd, Flag_swim | Flag_walk, mAreaCosts, mOut), Status::Success); - EXPECT_EQ(mPath, std::deque({ - osg::Vec3f(0, 215, -94.75363922119140625), - osg::Vec3f(0, 186.6666717529296875, -106.0000152587890625), - osg::Vec3f(0, 158.333343505859375, -115.85507965087890625), - osg::Vec3f(0, 130.0000152587890625, -125.71016693115234375), - osg::Vec3f(0, 101.66667938232421875, -135.5652313232421875), - osg::Vec3f(0, 73.333343505859375, -143.3333587646484375), - osg::Vec3f(0, 45.0000152587890625, -143.3333587646484375), - osg::Vec3f(0, 16.6666812896728515625, -143.3333587646484375), - osg::Vec3f(0, -11.66664981842041015625, -143.3333587646484375), - osg::Vec3f(0, -39.999980926513671875, -143.3333587646484375), - osg::Vec3f(0, -68.33331298828125, -143.3333587646484375), - osg::Vec3f(0, -96.66664886474609375, -137.3043670654296875), - osg::Vec3f(0, -124.99997711181640625, -127.44930267333984375), - osg::Vec3f(0, -153.33331298828125, -117.59423065185546875), - osg::Vec3f(0, -181.6666412353515625, -107.73915863037109375), - osg::Vec3f(0, -209.999969482421875, -97.7971343994140625), - osg::Vec3f(0, -215, -94.75363922119140625), - })) << mPath; + EXPECT_THAT(mPath, ElementsAre( + Vec3fEq(0, 215, -94.75363922119140625), + Vec3fEq(0, 186.6666717529296875, -106.0000152587890625), + Vec3fEq(0, 158.333343505859375, -115.85507965087890625), + Vec3fEq(0, 130.0000152587890625, -125.71016693115234375), + Vec3fEq(0, 101.66667938232421875, -135.5652313232421875), + Vec3fEq(0, 73.333343505859375, -143.3333587646484375), + Vec3fEq(0, 45.0000152587890625, -143.3333587646484375), + Vec3fEq(0, 16.6666812896728515625, -143.3333587646484375), + Vec3fEq(0, -11.66664981842041015625, -143.3333587646484375), + Vec3fEq(0, -39.999980926513671875, -143.3333587646484375), + Vec3fEq(0, -68.33331298828125, -143.3333587646484375), + Vec3fEq(0, -96.66664886474609375, -137.3043670654296875), + Vec3fEq(0, -124.99997711181640625, -127.44930267333984375), + Vec3fEq(0, -153.33331298828125, -117.59423065185546875), + Vec3fEq(0, -181.6666412353515625, -107.73915863037109375), + Vec3fEq(0, -209.999969482421875, -97.7971343994140625), + Vec3fEq(0, -215, -94.75363922119140625) + )); } TEST_F(DetourNavigatorNavigatorTest, path_should_be_over_water_when_ground_cross_water_with_max_int_cells_size_and_swim_and_walk_flags) @@ -552,25 +552,25 @@ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd, Flag_swim | Flag_walk, mAreaCosts, mOut), Status::Success); - EXPECT_EQ(mPath, std::deque({ - osg::Vec3f(0, 215, -94.75363922119140625), - osg::Vec3f(0, 186.6666717529296875, -106.0000152587890625), - osg::Vec3f(0, 158.333343505859375, -115.85507965087890625), - osg::Vec3f(0, 130.0000152587890625, -125.71016693115234375), - osg::Vec3f(0, 101.66667938232421875, -135.5652313232421875), - osg::Vec3f(0, 73.333343505859375, -143.3333587646484375), - osg::Vec3f(0, 45.0000152587890625, -143.3333587646484375), - osg::Vec3f(0, 16.6666812896728515625, -143.3333587646484375), - osg::Vec3f(0, -11.66664981842041015625, -143.3333587646484375), - osg::Vec3f(0, -39.999980926513671875, -143.3333587646484375), - osg::Vec3f(0, -68.33331298828125, -143.3333587646484375), - osg::Vec3f(0, -96.66664886474609375, -137.3043670654296875), - osg::Vec3f(0, -124.99997711181640625, -127.44930267333984375), - osg::Vec3f(0, -153.33331298828125, -117.59423065185546875), - osg::Vec3f(0, -181.6666412353515625, -107.73915863037109375), - osg::Vec3f(0, -209.999969482421875, -97.7971343994140625), - osg::Vec3f(0, -215, -94.75363922119140625), - })) << mPath; + EXPECT_THAT(mPath, ElementsAre( + Vec3fEq(0, 215, -94.75363922119140625), + Vec3fEq(0, 186.6666717529296875, -106.0000152587890625), + Vec3fEq(0, 158.333343505859375, -115.85507965087890625), + Vec3fEq(0, 130.0000152587890625, -125.71016693115234375), + Vec3fEq(0, 101.66667938232421875, -135.5652313232421875), + Vec3fEq(0, 73.333343505859375, -143.3333587646484375), + Vec3fEq(0, 45.0000152587890625, -143.3333587646484375), + Vec3fEq(0, 16.6666812896728515625, -143.3333587646484375), + Vec3fEq(0, -11.66664981842041015625, -143.3333587646484375), + Vec3fEq(0, -39.999980926513671875, -143.3333587646484375), + Vec3fEq(0, -68.33331298828125, -143.3333587646484375), + Vec3fEq(0, -96.66664886474609375, -137.3043670654296875), + Vec3fEq(0, -124.99997711181640625, -127.44930267333984375), + Vec3fEq(0, -153.33331298828125, -117.59423065185546875), + Vec3fEq(0, -181.6666412353515625, -107.73915863037109375), + Vec3fEq(0, -209.999969482421875, -97.7971343994140625), + Vec3fEq(0, -215, -94.75363922119140625) + )); } TEST_F(DetourNavigatorNavigatorTest, path_should_be_over_ground_when_ground_cross_water_with_only_walk_flag)