commit ff1d5697a8d62caaf5fe9750209e7487624a1c95
Author: Ben Rosser <rosser.bjr(a)gmail.com>
Date: Thu Sep 3 23:33:52 2020 -0400
Fix unit test issues on non-x86 architectures.
ddab86d94046eab0c0713371990deb04b3f423cc.patch | 593 +++++++++++++++++++++++++
openmw-recastmesh-extra-test-epsilon.patch | 17 +
openmw.spec | 7 +
3 files changed, 617 insertions(+)
---
diff --git a/ddab86d94046eab0c0713371990deb04b3f423cc.patch
b/ddab86d94046eab0c0713371990deb04b3f423cc.patch
new file mode 100644
index 0000000..8da7740
--- /dev/null
+++ b/ddab86d94046eab0c0713371990deb04b3f423cc.patch
@@ -0,0 +1,593 @@
+From ddab86d94046eab0c0713371990deb04b3f423cc Mon Sep 17 00:00:00 2001
+From: Alexey Sokolov <sokolov(a)google.com>
+Date: Sun, 16 Feb 2020 01:26:23 +0000
+Subject: [PATCH] Use approximate comparison for floating point in test
+
+This fixes test suite on my machine
+---
+ .../detournavigator/navigator.cpp | 452 +++++++++---------
+ .../detournavigator/recastmeshbuilder.cpp | 9 +-
+ 2 files changed, 234 insertions(+), 227 deletions(-)
+
+diff --git a/apps/openmw_test_suite/detournavigator/navigator.cpp
b/apps/openmw_test_suite/detournavigator/navigator.cpp
+index df8be3781..51370c8e0 100644
+--- a/apps/openmw_test_suite/detournavigator/navigator.cpp
++++ b/apps/openmw_test_suite/detournavigator/navigator.cpp
+@@ -11,10 +11,16 @@
+ #include <boost/optional/optional_io.hpp>
+
+ #include <gtest/gtest.h>
++#include <gmock/gmock.h>
+
+ #include <iterator>
+ #include <deque>
+
++MATCHER_P3(Vec3fEq, x, y, z, "")
++{
++ return std::abs(arg.x() - x) < 1e-4 && std::abs(arg.y() - y) < 1e-4
&& std::abs(arg.z() - z) < 1e-4;
++}
++
+ namespace
+ {
+ using namespace testing;
+@@ -113,31 +119,31 @@ namespace
+
+ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd,
Flag_walk, mOut), Status::Success);
+
+- EXPECT_EQ(mPath, std::deque<osg::Vec3f>({
+- osg::Vec3f(-215, 215, 1.85963428020477294921875),
+- osg::Vec3f(-194.9653167724609375, 194.9653167724609375,
-6.57602214813232421875),
+- osg::Vec3f(-174.930633544921875, 174.930633544921875,
-15.01167774200439453125),
+- osg::Vec3f(-154.8959503173828125, 154.8959503173828125,
-23.4473361968994140625),
+- osg::Vec3f(-134.86126708984375, 134.86126708984375,
-31.8829936981201171875),
+- osg::Vec3f(-114.82657623291015625, 114.82657623291015625,
-40.3186492919921875),
+- osg::Vec3f(-94.7918853759765625, 94.7918853759765625,
-47.3990631103515625),
+- osg::Vec3f(-74.75719451904296875, 74.75719451904296875,
-53.7258148193359375),
+- osg::Vec3f(-54.722499847412109375, 54.722499847412109375,
-60.052555084228515625),
+- osg::Vec3f(-34.68780517578125, 34.68780517578125, -66.37931060791015625),
+- osg::Vec3f(-14.6531162261962890625, 14.6531162261962890625,
-72.70604705810546875),
+- osg::Vec3f(5.3815765380859375, -5.3815765380859375, -75.35065460205078125),
+- osg::Vec3f(25.41626739501953125, -25.41626739501953125,
-67.9694671630859375),
+- osg::Vec3f(45.450958251953125, -45.450958251953125, -60.5882568359375),
+- osg::Vec3f(65.48564910888671875, -65.48564910888671875,
-53.20705413818359375),
+- osg::Vec3f(85.5203399658203125, -85.5203399658203125,
-45.8258514404296875),
+- osg::Vec3f(105.55503082275390625, -105.55503082275390625,
-38.44464874267578125),
+- osg::Vec3f(125.5897216796875, -125.5897216796875, -31.063449859619140625),
+- osg::Vec3f(145.6244049072265625, -145.6244049072265625, -23.6822509765625),
+- osg::Vec3f(165.659088134765625, -165.659088134765625,
-16.3010501861572265625),
+- osg::Vec3f(185.6937713623046875, -185.6937713623046875,
-8.91985416412353515625),
+- osg::Vec3f(205.7284698486328125, -205.7284698486328125,
-1.5386505126953125),
+- osg::Vec3f(215, -215, 1.87718021869659423828125),
+- })) << mPath;
++ EXPECT_THAT(mPath, ElementsAre(
++ Vec3fEq(-215, 215, 1.85963428020477294921875),
++ Vec3fEq(-194.9653167724609375, 194.9653167724609375,
-6.57602214813232421875),
++ Vec3fEq(-174.930633544921875, 174.930633544921875,
-15.01167774200439453125),
++ Vec3fEq(-154.8959503173828125, 154.8959503173828125,
-23.4473361968994140625),
++ Vec3fEq(-134.86126708984375, 134.86126708984375, -31.8829936981201171875),
++ Vec3fEq(-114.82657623291015625, 114.82657623291015625,
-40.3186492919921875),
++ Vec3fEq(-94.7918853759765625, 94.7918853759765625, -47.3990631103515625),
++ Vec3fEq(-74.75719451904296875, 74.75719451904296875, -53.7258148193359375),
++ Vec3fEq(-54.722499847412109375, 54.722499847412109375,
-60.052555084228515625),
++ Vec3fEq(-34.68780517578125, 34.68780517578125, -66.37931060791015625),
++ Vec3fEq(-14.6531162261962890625, 14.6531162261962890625,
-72.70604705810546875),
++ Vec3fEq(5.3815765380859375, -5.3815765380859375, -75.35065460205078125),
++ Vec3fEq(25.41626739501953125, -25.41626739501953125, -67.9694671630859375),
++ Vec3fEq(45.450958251953125, -45.450958251953125, -60.5882568359375),
++ Vec3fEq(65.48564910888671875, -65.48564910888671875,
-53.20705413818359375),
++ Vec3fEq(85.5203399658203125, -85.5203399658203125, -45.8258514404296875),
++ Vec3fEq(105.55503082275390625, -105.55503082275390625,
-38.44464874267578125),
++ Vec3fEq(125.5897216796875, -125.5897216796875, -31.063449859619140625),
++ Vec3fEq(145.6244049072265625, -145.6244049072265625, -23.6822509765625),
++ Vec3fEq(165.659088134765625, -165.659088134765625,
-16.3010501861572265625),
++ Vec3fEq(185.6937713623046875, -185.6937713623046875,
-8.91985416412353515625),
++ Vec3fEq(205.7284698486328125, -205.7284698486328125, -1.5386505126953125),
++ Vec3fEq(215, -215, 1.87718021869659423828125)
++ ));
+ }
+
+ TEST_F(DetourNavigatorNavigatorTest, add_object_should_change_navmesh)
+@@ -163,31 +169,31 @@ namespace
+
+ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd,
Flag_walk, mOut), Status::Success);
+
+- EXPECT_EQ(mPath, std::deque<osg::Vec3f>({
+- osg::Vec3f(-215, 215, 1.85963428020477294921875),
+- osg::Vec3f(-194.9653167724609375, 194.9653167724609375,
-6.57602214813232421875),
+- osg::Vec3f(-174.930633544921875, 174.930633544921875,
-15.01167774200439453125),
+- osg::Vec3f(-154.8959503173828125, 154.8959503173828125,
-23.4473361968994140625),
+- osg::Vec3f(-134.86126708984375, 134.86126708984375,
-31.8829936981201171875),
+- osg::Vec3f(-114.82657623291015625, 114.82657623291015625,
-40.3186492919921875),
+- osg::Vec3f(-94.7918853759765625, 94.7918853759765625,
-47.3990631103515625),
+- osg::Vec3f(-74.75719451904296875, 74.75719451904296875,
-53.7258148193359375),
+- osg::Vec3f(-54.722499847412109375, 54.722499847412109375,
-60.052555084228515625),
+- osg::Vec3f(-34.68780517578125, 34.68780517578125, -66.37931060791015625),
+- osg::Vec3f(-14.6531162261962890625, 14.6531162261962890625,
-72.70604705810546875),
+- osg::Vec3f(5.3815765380859375, -5.3815765380859375, -75.35065460205078125),
+- osg::Vec3f(25.41626739501953125, -25.41626739501953125,
-67.9694671630859375),
+- osg::Vec3f(45.450958251953125, -45.450958251953125, -60.5882568359375),
+- osg::Vec3f(65.48564910888671875, -65.48564910888671875,
-53.20705413818359375),
+- osg::Vec3f(85.5203399658203125, -85.5203399658203125,
-45.8258514404296875),
+- osg::Vec3f(105.55503082275390625, -105.55503082275390625,
-38.44464874267578125),
+- osg::Vec3f(125.5897216796875, -125.5897216796875, -31.063449859619140625),
+- osg::Vec3f(145.6244049072265625, -145.6244049072265625, -23.6822509765625),
+- osg::Vec3f(165.659088134765625, -165.659088134765625,
-16.3010501861572265625),
+- osg::Vec3f(185.6937713623046875, -185.6937713623046875,
-8.91985416412353515625),
+- osg::Vec3f(205.7284698486328125, -205.7284698486328125,
-1.5386505126953125),
+- osg::Vec3f(215, -215, 1.87718021869659423828125),
+- })) << mPath;
++ EXPECT_THAT(mPath, ElementsAre(
++ Vec3fEq(-215, 215, 1.85963428020477294921875),
++ Vec3fEq(-194.9653167724609375, 194.9653167724609375,
-6.57602214813232421875),
++ Vec3fEq(-174.930633544921875, 174.930633544921875,
-15.01167774200439453125),
++ Vec3fEq(-154.8959503173828125, 154.8959503173828125,
-23.4473361968994140625),
++ Vec3fEq(-134.86126708984375, 134.86126708984375, -31.8829936981201171875),
++ Vec3fEq(-114.82657623291015625, 114.82657623291015625,
-40.3186492919921875),
++ Vec3fEq(-94.7918853759765625, 94.7918853759765625, -47.3990631103515625),
++ Vec3fEq(-74.75719451904296875, 74.75719451904296875, -53.7258148193359375),
++ Vec3fEq(-54.722499847412109375, 54.722499847412109375,
-60.052555084228515625),
++ Vec3fEq(-34.68780517578125, 34.68780517578125, -66.37931060791015625),
++ Vec3fEq(-14.6531162261962890625, 14.6531162261962890625,
-72.70604705810546875),
++ Vec3fEq(5.3815765380859375, -5.3815765380859375, -75.35065460205078125),
++ Vec3fEq(25.41626739501953125, -25.41626739501953125, -67.9694671630859375),
++ Vec3fEq(45.450958251953125, -45.450958251953125, -60.5882568359375),
++ Vec3fEq(65.48564910888671875, -65.48564910888671875,
-53.20705413818359375),
++ Vec3fEq(85.5203399658203125, -85.5203399658203125, -45.8258514404296875),
++ Vec3fEq(105.55503082275390625, -105.55503082275390625,
-38.44464874267578125),
++ Vec3fEq(125.5897216796875, -125.5897216796875, -31.063449859619140625),
++ Vec3fEq(145.6244049072265625, -145.6244049072265625, -23.6822509765625),
++ Vec3fEq(165.659088134765625, -165.659088134765625,
-16.3010501861572265625),
++ Vec3fEq(185.6937713623046875, -185.6937713623046875,
-8.91985416412353515625),
++ Vec3fEq(205.7284698486328125, -205.7284698486328125, -1.5386505126953125),
++ Vec3fEq(215, -215, 1.87718021869659423828125)
++ ));
+
+ mNavigator->addObject(ObjectId(&compoundShape), compoundShape,
btTransform::getIdentity());
+ mNavigator->update(mPlayerPosition);
+@@ -197,31 +203,31 @@ namespace
+ mOut = std::back_inserter(mPath);
+ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd,
Flag_walk, mOut), Status::Success);
+
+- EXPECT_EQ(mPath, std::deque<osg::Vec3f>({
+- osg::Vec3f(-215, 215, 1.87826788425445556640625),
+- osg::Vec3f(-199.7968292236328125, 191.09100341796875,
-3.54876613616943359375),
+- osg::Vec3f(-184.5936431884765625, 167.1819915771484375,
-8.97847843170166015625),
+- osg::Vec3f(-169.3904571533203125, 143.2729949951171875,
-14.408184051513671875),
+- osg::Vec3f(-154.1872711181640625, 119.36397552490234375, -19.837890625),
+- osg::Vec3f(-138.9840850830078125, 95.45496368408203125,
-25.2675991058349609375),
+- osg::Vec3f(-123.78090667724609375, 71.54595184326171875,
-30.6973056793212890625),
+- osg::Vec3f(-108.57772064208984375, 47.636936187744140625,
-36.12701416015625),
+- osg::Vec3f(-93.3745269775390625, 23.7279262542724609375,
-40.754688262939453125),
+- osg::Vec3f(-78.17134857177734375, -0.18108306825160980224609375,
-37.128787994384765625),
+- osg::Vec3f(-62.968158721923828125, -24.0900936126708984375,
-33.50289154052734375),
+- osg::Vec3f(-47.764972686767578125, -47.999103546142578125,
-30.797946929931640625),
+- osg::Vec3f(-23.852447509765625, -63.196765899658203125,
-33.97112274169921875),
+- osg::Vec3f(0.0600789971649646759033203125, -78.39443206787109375,
-37.14543914794921875),
+- osg::Vec3f(23.97260284423828125, -93.5920867919921875,
-40.774089813232421875),
+- osg::Vec3f(47.885128021240234375, -108.78974151611328125,
-36.05129241943359375),
+- osg::Vec3f(71.7976531982421875, -123.98740386962890625,
-30.6235561370849609375),
+- osg::Vec3f(95.71018218994140625, -139.18505859375,
-25.1958255767822265625),
+- osg::Vec3f(119.6226959228515625, -154.382720947265625,
-19.7680912017822265625),
+- osg::Vec3f(143.53521728515625, -169.58038330078125,
-14.34035205841064453125),
+- osg::Vec3f(167.4477386474609375, -184.778045654296875,
-8.9126186370849609375),
+- osg::Vec3f(191.360260009765625, -199.9757080078125,
-3.4848802089691162109375),
+- osg::Vec3f(215, -215, 1.87826788425445556640625),
+- })) << mPath;
++ EXPECT_THAT(mPath, ElementsAre(
++ Vec3fEq(-215, 215, 1.87826788425445556640625),
++ Vec3fEq(-199.7968292236328125, 191.09100341796875,
-3.54876613616943359375),
++ Vec3fEq(-184.5936431884765625, 167.1819915771484375,
-8.97847843170166015625),
++ Vec3fEq(-169.3904571533203125, 143.2729949951171875,
-14.408184051513671875),
++ Vec3fEq(-154.1872711181640625, 119.36397552490234375, -19.837890625),
++ Vec3fEq(-138.9840850830078125, 95.45496368408203125,
-25.2675991058349609375),
++ Vec3fEq(-123.78090667724609375, 71.54595184326171875,
-30.6973056793212890625),
++ Vec3fEq(-108.57772064208984375, 47.636936187744140625, -36.12701416015625),
++ Vec3fEq(-93.3745269775390625, 23.7279262542724609375,
-40.754688262939453125),
++ Vec3fEq(-78.17134857177734375, -0.18108306825160980224609375,
-37.128787994384765625),
++ Vec3fEq(-62.968158721923828125, -24.0900936126708984375,
-33.50289154052734375),
++ Vec3fEq(-47.764972686767578125, -47.999103546142578125,
-30.797946929931640625),
++ Vec3fEq(-23.852447509765625, -63.196765899658203125,
-33.97112274169921875),
++ Vec3fEq(0.0600789971649646759033203125, -78.39443206787109375,
-37.14543914794921875),
++ Vec3fEq(23.97260284423828125, -93.5920867919921875,
-40.774089813232421875),
++ Vec3fEq(47.885128021240234375, -108.78974151611328125,
-36.05129241943359375),
++ Vec3fEq(71.7976531982421875, -123.98740386962890625,
-30.6235561370849609375),
++ Vec3fEq(95.71018218994140625, -139.18505859375, -25.1958255767822265625),
++ Vec3fEq(119.6226959228515625, -154.382720947265625,
-19.7680912017822265625),
++ Vec3fEq(143.53521728515625, -169.58038330078125, -14.34035205841064453125),
++ Vec3fEq(167.4477386474609375, -184.778045654296875,
-8.9126186370849609375),
++ Vec3fEq(191.360260009765625, -199.9757080078125,
-3.4848802089691162109375),
++ Vec3fEq(215, -215, 1.87826788425445556640625)
++ ));
+ }
+
+ TEST_F(DetourNavigatorNavigatorTest, update_changed_object_should_change_navmesh)
+@@ -248,31 +254,31 @@ namespace
+
+ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd,
Flag_walk, mOut), Status::Success);
+
+- EXPECT_EQ(mPath, std::deque<osg::Vec3f>({
+- osg::Vec3f(-215, 215, 1.87826788425445556640625),
+- osg::Vec3f(-199.7968292236328125, 191.09100341796875,
-3.54876613616943359375),
+- osg::Vec3f(-184.5936431884765625, 167.1819915771484375,
-8.97847843170166015625),
+- osg::Vec3f(-169.3904571533203125, 143.2729949951171875,
-14.408184051513671875),
+- osg::Vec3f(-154.1872711181640625, 119.36397552490234375, -19.837890625),
+- osg::Vec3f(-138.9840850830078125, 95.45496368408203125,
-25.2675991058349609375),
+- osg::Vec3f(-123.78090667724609375, 71.54595184326171875,
-30.6973056793212890625),
+- osg::Vec3f(-108.57772064208984375, 47.636936187744140625,
-36.12701416015625),
+- osg::Vec3f(-93.3745269775390625, 23.7279262542724609375,
-40.754688262939453125),
+- osg::Vec3f(-78.17134857177734375, -0.18108306825160980224609375,
-37.128787994384765625),
+- osg::Vec3f(-62.968158721923828125, -24.0900936126708984375,
-33.50289154052734375),
+- osg::Vec3f(-47.764972686767578125, -47.999103546142578125,
-30.797946929931640625),
+- osg::Vec3f(-23.852447509765625, -63.196765899658203125,
-33.97112274169921875),
+- osg::Vec3f(0.0600789971649646759033203125, -78.39443206787109375,
-37.14543914794921875),
+- osg::Vec3f(23.97260284423828125, -93.5920867919921875,
-40.774089813232421875),
+- osg::Vec3f(47.885128021240234375, -108.78974151611328125,
-36.05129241943359375),
+- osg::Vec3f(71.7976531982421875, -123.98740386962890625,
-30.6235561370849609375),
+- osg::Vec3f(95.71018218994140625, -139.18505859375,
-25.1958255767822265625),
+- osg::Vec3f(119.6226959228515625, -154.382720947265625,
-19.7680912017822265625),
+- osg::Vec3f(143.53521728515625, -169.58038330078125,
-14.34035205841064453125),
+- osg::Vec3f(167.4477386474609375, -184.778045654296875,
-8.9126186370849609375),
+- osg::Vec3f(191.360260009765625, -199.9757080078125,
-3.4848802089691162109375),
+- osg::Vec3f(215, -215, 1.87826788425445556640625),
+- })) << mPath;
++ EXPECT_THAT(mPath, ElementsAre(
++ Vec3fEq(-215, 215, 1.87826788425445556640625),
++ Vec3fEq(-199.7968292236328125, 191.09100341796875,
-3.54876613616943359375),
++ Vec3fEq(-184.5936431884765625, 167.1819915771484375,
-8.97847843170166015625),
++ Vec3fEq(-169.3904571533203125, 143.2729949951171875,
-14.408184051513671875),
++ Vec3fEq(-154.1872711181640625, 119.36397552490234375, -19.837890625),
++ Vec3fEq(-138.9840850830078125, 95.45496368408203125,
-25.2675991058349609375),
++ Vec3fEq(-123.78090667724609375, 71.54595184326171875,
-30.6973056793212890625),
++ Vec3fEq(-108.57772064208984375, 47.636936187744140625, -36.12701416015625),
++ Vec3fEq(-93.3745269775390625, 23.7279262542724609375,
-40.754688262939453125),
++ Vec3fEq(-78.17134857177734375, -0.18108306825160980224609375,
-37.128787994384765625),
++ Vec3fEq(-62.968158721923828125, -24.0900936126708984375,
-33.50289154052734375),
++ Vec3fEq(-47.764972686767578125, -47.999103546142578125,
-30.797946929931640625),
++ Vec3fEq(-23.852447509765625, -63.196765899658203125,
-33.97112274169921875),
++ Vec3fEq(0.0600789971649646759033203125, -78.39443206787109375,
-37.14543914794921875),
++ Vec3fEq(23.97260284423828125, -93.5920867919921875,
-40.774089813232421875),
++ Vec3fEq(47.885128021240234375, -108.78974151611328125,
-36.05129241943359375),
++ Vec3fEq(71.7976531982421875, -123.98740386962890625,
-30.6235561370849609375),
++ Vec3fEq(95.71018218994140625, -139.18505859375, -25.1958255767822265625),
++ Vec3fEq(119.6226959228515625, -154.382720947265625,
-19.7680912017822265625),
++ Vec3fEq(143.53521728515625, -169.58038330078125, -14.34035205841064453125),
++ Vec3fEq(167.4477386474609375, -184.778045654296875,
-8.9126186370849609375),
++ Vec3fEq(191.360260009765625, -199.9757080078125,
-3.4848802089691162109375),
++ Vec3fEq(215, -215, 1.87826788425445556640625)
++ ));
+
+ compoundShape.updateChildTransform(0, btTransform(btMatrix3x3::getIdentity(),
btVector3(1000, 0, 0)));
+
+@@ -284,31 +290,31 @@ namespace
+ mOut = std::back_inserter(mPath);
+ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd,
Flag_walk, mOut), Status::Success);
+
+- EXPECT_EQ(mPath, std::deque<osg::Vec3f>({
+- osg::Vec3f(-215, 215, 1.85963428020477294921875),
+- osg::Vec3f(-194.9653167724609375, 194.9653167724609375,
-6.57602214813232421875),
+- osg::Vec3f(-174.930633544921875, 174.930633544921875,
-15.01167774200439453125),
+- osg::Vec3f(-154.8959503173828125, 154.8959503173828125,
-23.4473361968994140625),
+- osg::Vec3f(-134.86126708984375, 134.86126708984375,
-31.8829936981201171875),
+- osg::Vec3f(-114.82657623291015625, 114.82657623291015625,
-40.3186492919921875),
+- osg::Vec3f(-94.7918853759765625, 94.7918853759765625,
-47.3990631103515625),
+- osg::Vec3f(-74.75719451904296875, 74.75719451904296875,
-53.7258148193359375),
+- osg::Vec3f(-54.722499847412109375, 54.722499847412109375,
-60.052555084228515625),
+- osg::Vec3f(-34.68780517578125, 34.68780517578125, -66.37931060791015625),
+- osg::Vec3f(-14.6531162261962890625, 14.6531162261962890625,
-72.70604705810546875),
+- osg::Vec3f(5.3815765380859375, -5.3815765380859375, -75.35065460205078125),
+- osg::Vec3f(25.41626739501953125, -25.41626739501953125,
-67.9694671630859375),
+- osg::Vec3f(45.450958251953125, -45.450958251953125, -60.5882568359375),
+- osg::Vec3f(65.48564910888671875, -65.48564910888671875,
-53.20705413818359375),
+- osg::Vec3f(85.5203399658203125, -85.5203399658203125,
-45.8258514404296875),
+- osg::Vec3f(105.55503082275390625, -105.55503082275390625,
-38.44464874267578125),
+- osg::Vec3f(125.5897216796875, -125.5897216796875, -31.063449859619140625),
+- osg::Vec3f(145.6244049072265625, -145.6244049072265625, -23.6822509765625),
+- osg::Vec3f(165.659088134765625, -165.659088134765625,
-16.3010501861572265625),
+- osg::Vec3f(185.6937713623046875, -185.6937713623046875,
-8.91985416412353515625),
+- osg::Vec3f(205.7284698486328125, -205.7284698486328125,
-1.5386505126953125),
+- osg::Vec3f(215, -215, 1.87718021869659423828125),
+- })) << mPath;
++ EXPECT_THAT(mPath, ElementsAre(
++ Vec3fEq(-215, 215, 1.85963428020477294921875),
++ Vec3fEq(-194.9653167724609375, 194.9653167724609375,
-6.57602214813232421875),
++ Vec3fEq(-174.930633544921875, 174.930633544921875,
-15.01167774200439453125),
++ Vec3fEq(-154.8959503173828125, 154.8959503173828125,
-23.4473361968994140625),
++ Vec3fEq(-134.86126708984375, 134.86126708984375, -31.8829936981201171875),
++ Vec3fEq(-114.82657623291015625, 114.82657623291015625,
-40.3186492919921875),
++ Vec3fEq(-94.7918853759765625, 94.7918853759765625, -47.3990631103515625),
++ Vec3fEq(-74.75719451904296875, 74.75719451904296875, -53.7258148193359375),
++ Vec3fEq(-54.722499847412109375, 54.722499847412109375,
-60.052555084228515625),
++ Vec3fEq(-34.68780517578125, 34.68780517578125, -66.37931060791015625),
++ Vec3fEq(-14.6531162261962890625, 14.6531162261962890625,
-72.70604705810546875),
++ Vec3fEq(5.3815765380859375, -5.3815765380859375, -75.35065460205078125),
++ Vec3fEq(25.41626739501953125, -25.41626739501953125, -67.9694671630859375),
++ Vec3fEq(45.450958251953125, -45.450958251953125, -60.5882568359375),
++ Vec3fEq(65.48564910888671875, -65.48564910888671875,
-53.20705413818359375),
++ Vec3fEq(85.5203399658203125, -85.5203399658203125, -45.8258514404296875),
++ Vec3fEq(105.55503082275390625, -105.55503082275390625,
-38.44464874267578125),
++ Vec3fEq(125.5897216796875, -125.5897216796875, -31.063449859619140625),
++ Vec3fEq(145.6244049072265625, -145.6244049072265625, -23.6822509765625),
++ Vec3fEq(165.659088134765625, -165.659088134765625,
-16.3010501861572265625),
++ Vec3fEq(185.6937713623046875, -185.6937713623046875,
-8.91985416412353515625),
++ Vec3fEq(205.7284698486328125, -205.7284698486328125, -1.5386505126953125),
++ Vec3fEq(215, -215, 1.87718021869659423828125)
++ ));
+ }
+
+ TEST_F(DetourNavigatorNavigatorTest,
for_overlapping_heightfields_should_use_higher)
+@@ -341,31 +347,31 @@ namespace
+
+ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd,
Flag_walk, mOut), Status::Success);
+
+- EXPECT_EQ(mPath, std::deque<osg::Vec3f>({
+- osg::Vec3f(-215, 215, 1.96328866481781005859375),
+- osg::Vec3f(-194.9653167724609375, 194.9653167724609375,
-0.242215454578399658203125),
+- osg::Vec3f(-174.930633544921875, 174.930633544921875,
-2.447719097137451171875),
+- osg::Vec3f(-154.8959503173828125, 154.8959503173828125,
-4.65322399139404296875),
+- osg::Vec3f(-134.86126708984375, 134.86126708984375,
-6.858726978302001953125),
+- osg::Vec3f(-114.82657623291015625, 114.82657623291015625,
-9.06423282623291015625),
+- osg::Vec3f(-94.7918853759765625, 94.7918853759765625,
-11.26973628997802734375),
+- osg::Vec3f(-74.75719451904296875, 74.75719451904296875,
-13.26497173309326171875),
+- osg::Vec3f(-54.722499847412109375, 54.722499847412109375,
-15.24860477447509765625),
+- osg::Vec3f(-34.68780517578125, 34.68780517578125, -17.23223876953125),
+- osg::Vec3f(-14.6531162261962890625, 14.6531162261962890625,
-19.215869903564453125),
+- osg::Vec3f(5.3815765380859375, -5.3815765380859375,
-20.1338443756103515625),
+- osg::Vec3f(25.41626739501953125, -25.41626739501953125,
-18.1502132415771484375),
+- osg::Vec3f(45.450958251953125, -45.450958251953125, -16.1665802001953125),
+- osg::Vec3f(65.48564910888671875, -65.48564910888671875,
-14.18294620513916015625),
+- osg::Vec3f(85.5203399658203125, -85.5203399658203125,
-12.199314117431640625),
+- osg::Vec3f(105.55503082275390625, -105.55503082275390625,
-10.08488368988037109375),
+- osg::Vec3f(125.5897216796875, -125.5897216796875, -7.87938022613525390625),
+- osg::Vec3f(145.6244049072265625, -145.6244049072265625,
-5.673875331878662109375),
+- osg::Vec3f(165.659088134765625, -165.659088134765625,
-3.468370914459228515625),
+- osg::Vec3f(185.6937713623046875, -185.6937713623046875,
-1.26286637783050537109375),
+- osg::Vec3f(205.7284698486328125, -205.7284698486328125,
0.942641556262969970703125),
+- osg::Vec3f(215, -215, 1.96328866481781005859375),
+- })) << mPath;
++ EXPECT_THAT(mPath, ElementsAre(
++ Vec3fEq(-215, 215, 1.96328866481781005859375),
++ Vec3fEq(-194.9653167724609375, 194.9653167724609375,
-0.242215454578399658203125),
++ Vec3fEq(-174.930633544921875, 174.930633544921875,
-2.447719097137451171875),
++ Vec3fEq(-154.8959503173828125, 154.8959503173828125,
-4.65322399139404296875),
++ Vec3fEq(-134.86126708984375, 134.86126708984375, -6.858726978302001953125),
++ Vec3fEq(-114.82657623291015625, 114.82657623291015625,
-9.06423282623291015625),
++ Vec3fEq(-94.7918853759765625, 94.7918853759765625,
-11.26973628997802734375),
++ Vec3fEq(-74.75719451904296875, 74.75719451904296875,
-13.26497173309326171875),
++ Vec3fEq(-54.722499847412109375, 54.722499847412109375,
-15.24860477447509765625),
++ Vec3fEq(-34.68780517578125, 34.68780517578125, -17.23223876953125),
++ Vec3fEq(-14.6531162261962890625, 14.6531162261962890625,
-19.215869903564453125),
++ Vec3fEq(5.3815765380859375, -5.3815765380859375, -20.1338443756103515625),
++ Vec3fEq(25.41626739501953125, -25.41626739501953125,
-18.1502132415771484375),
++ Vec3fEq(45.450958251953125, -45.450958251953125, -16.1665802001953125),
++ Vec3fEq(65.48564910888671875, -65.48564910888671875,
-14.18294620513916015625),
++ Vec3fEq(85.5203399658203125, -85.5203399658203125, -12.199314117431640625),
++ Vec3fEq(105.55503082275390625, -105.55503082275390625,
-10.08488368988037109375),
++ Vec3fEq(125.5897216796875, -125.5897216796875, -7.87938022613525390625),
++ Vec3fEq(145.6244049072265625, -145.6244049072265625,
-5.673875331878662109375),
++ Vec3fEq(165.659088134765625, -165.659088134765625,
-3.468370914459228515625),
++ Vec3fEq(185.6937713623046875, -185.6937713623046875,
-1.26286637783050537109375),
++ Vec3fEq(205.7284698486328125, -205.7284698486328125,
0.942641556262969970703125),
++ Vec3fEq(215, -215, 1.96328866481781005859375)
++ ));
+ }
+
+ TEST_F(DetourNavigatorNavigatorTest, path_should_be_around_avoid_shape)
+@@ -397,32 +403,32 @@ namespace
+
+ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd,
Flag_walk, mOut), Status::Success);
+
+- EXPECT_EQ(mPath, std::deque<osg::Vec3f>({
+- osg::Vec3f(-215, 215, 1.9393787384033203125),
+- osg::Vec3f(-200.8159637451171875, 190.47265625,
-0.639537751674652099609375),
+- osg::Vec3f(-186.6319427490234375, 165.9453125, -3.2184507846832275390625),
+- osg::Vec3f(-172.447906494140625, 141.41796875, -5.797363758087158203125),
+- osg::Vec3f(-158.263885498046875, 116.8906097412109375,
-8.37627696990966796875),
+- osg::Vec3f(-144.079864501953125, 92.3632659912109375,
-10.9551906585693359375),
+- osg::Vec3f(-129.89581298828125, 67.83591461181640625,
-13.53410625457763671875),
+- osg::Vec3f(-115.7117919921875, 43.308563232421875,
-16.1130199432373046875),
+- osg::Vec3f(-101.5277557373046875, 18.7812137603759765625,
-18.6919345855712890625),
+- osg::Vec3f(-87.34372711181640625, -5.7461376190185546875,
-20.4680538177490234375),
+- osg::Vec3f(-67.02922821044921875, -25.4970550537109375,
-20.514247894287109375),
+- osg::Vec3f(-46.714717864990234375, -45.2479705810546875,
-20.560443878173828125),
+- osg::Vec3f(-26.40021514892578125, -64.99889373779296875,
-20.6066417694091796875),
+- osg::Vec3f(-6.085712432861328125, -84.74980926513671875,
-20.652835845947265625),
+- osg::Vec3f(14.22879505157470703125, -104.50072479248046875,
-18.151397705078125),
+- osg::Vec3f(39.05098724365234375, -118.16222381591796875,
-15.66748714447021484375),
+- osg::Vec3f(63.87317657470703125, -131.82373046875,
-13.18358135223388671875),
+- osg::Vec3f(88.69537353515625, -145.4852142333984375,
-10.699672698974609375),
+- osg::Vec3f(113.51757049560546875, -159.146697998046875,
-8.21576786041259765625),
+- osg::Vec3f(138.3397674560546875, -172.808197021484375,
-5.731859683990478515625),
+- osg::Vec3f(163.1619720458984375, -186.469696044921875,
-3.2479507923126220703125),
+- osg::Vec3f(187.984161376953125, -200.1311798095703125,
-0.764044821262359619140625),
+- osg::Vec3f(212.8063507080078125, -213.7926788330078125,
1.719865322113037109375),
+- osg::Vec3f(215, -215, 1.9393787384033203125),
+- })) << mPath;
++ EXPECT_THAT(mPath, ElementsAre(
++ Vec3fEq(-215, 215, 1.9393787384033203125),
++ Vec3fEq(-200.8159637451171875, 190.47265625, -0.639537751674652099609375),
++ Vec3fEq(-186.6319427490234375, 165.9453125, -3.2184507846832275390625),
++ Vec3fEq(-172.447906494140625, 141.41796875, -5.797363758087158203125),
++ Vec3fEq(-158.263885498046875, 116.8906097412109375,
-8.37627696990966796875),
++ Vec3fEq(-144.079864501953125, 92.3632659912109375,
-10.9551906585693359375),
++ Vec3fEq(-129.89581298828125, 67.83591461181640625,
-13.53410625457763671875),
++ Vec3fEq(-115.7117919921875, 43.308563232421875, -16.1130199432373046875),
++ Vec3fEq(-101.5277557373046875, 18.7812137603759765625,
-18.6919345855712890625),
++ Vec3fEq(-87.34372711181640625, -5.7461376190185546875,
-20.4680538177490234375),
++ Vec3fEq(-67.02922821044921875, -25.4970550537109375,
-20.514247894287109375),
++ Vec3fEq(-46.714717864990234375, -45.2479705810546875,
-20.560443878173828125),
++ Vec3fEq(-26.40021514892578125, -64.99889373779296875,
-20.6066417694091796875),
++ Vec3fEq(-6.085712432861328125, -84.74980926513671875,
-20.652835845947265625),
++ Vec3fEq(14.22879505157470703125, -104.50072479248046875,
-18.151397705078125),
++ Vec3fEq(39.05098724365234375, -118.16222381591796875,
-15.66748714447021484375),
++ Vec3fEq(63.87317657470703125, -131.82373046875, -13.18358135223388671875),
++ Vec3fEq(88.69537353515625, -145.4852142333984375, -10.699672698974609375),
++ Vec3fEq(113.51757049560546875, -159.146697998046875,
-8.21576786041259765625),
++ Vec3fEq(138.3397674560546875, -172.808197021484375,
-5.731859683990478515625),
++ Vec3fEq(163.1619720458984375, -186.469696044921875,
-3.2479507923126220703125),
++ Vec3fEq(187.984161376953125, -200.1311798095703125,
-0.764044821262359619140625),
++ Vec3fEq(212.8063507080078125, -213.7926788330078125,
1.719865322113037109375),
++ Vec3fEq(215, -215, 1.9393787384033203125)
++ ));
+ }
+
+ TEST_F(DetourNavigatorNavigatorTest,
path_should_be_over_water_ground_lower_than_water_with_only_swim_flag)
+@@ -590,26 +596,26 @@ namespace
+
+ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd,
Flag_walk, mOut), Status::Success);
+
+- EXPECT_EQ(mPath, std::deque<osg::Vec3f>({
+- osg::Vec3f(0, 215, -94.75363922119140625),
+- osg::Vec3f(9.8083515167236328125, 188.4185333251953125, -105.199951171875),
+- osg::Vec3f(19.6167049407958984375, 161.837066650390625,
-114.25495147705078125),
+- osg::Vec3f(29.42505645751953125, 135.255615234375, -123.309967041015625),
+- osg::Vec3f(39.23340606689453125, 108.674163818359375,
-132.3649749755859375),
+- osg::Vec3f(49.04175567626953125, 82.09270477294921875, -137.2874755859375),
+- osg::Vec3f(58.8501129150390625, 55.5112457275390625, -139.2451171875),
+- osg::Vec3f(68.6584625244140625, 28.9297885894775390625,
-141.2027740478515625),
+- osg::Vec3f(78.4668121337890625, 2.3483295440673828125,
-143.1604156494140625),
+- osg::Vec3f(88.27516937255859375, -24.233127593994140625,
-141.3894805908203125),
+- osg::Vec3f(83.73651885986328125, -52.2005767822265625,
-142.3761444091796875),
+- osg::Vec3f(79.19786834716796875, -80.16802978515625, -143.114837646484375),
+- osg::Vec3f(64.8477935791015625, -104.598602294921875,
-137.840911865234375),
+- osg::Vec3f(50.497714996337890625, -129.0291748046875, -131.45831298828125),
+- osg::Vec3f(36.147632598876953125, -153.459747314453125,
-121.42321014404296875),
+- osg::Vec3f(21.7975559234619140625, -177.8903350830078125,
-111.38811492919921875),
+- osg::Vec3f(7.44747829437255859375, -202.3209075927734375,
-101.19382476806640625),
+- osg::Vec3f(0, -215, -94.75363922119140625),
+- })) << mPath;
++ EXPECT_THAT(mPath, ElementsAre(
++ Vec3fEq(0, 215, -94.75363922119140625),
++ Vec3fEq(9.8083515167236328125, 188.4185333251953125, -105.199951171875),
++ Vec3fEq(19.6167049407958984375, 161.837066650390625,
-114.25495147705078125),
++ Vec3fEq(29.42505645751953125, 135.255615234375, -123.309967041015625),
++ Vec3fEq(39.23340606689453125, 108.674163818359375, -132.3649749755859375),
++ Vec3fEq(49.04175567626953125, 82.09270477294921875, -137.2874755859375),
++ Vec3fEq(58.8501129150390625, 55.5112457275390625, -139.2451171875),
++ Vec3fEq(68.6584625244140625, 28.9297885894775390625,
-141.2027740478515625),
++ Vec3fEq(78.4668121337890625, 2.3483295440673828125, -143.1604156494140625),
++ Vec3fEq(88.27516937255859375, -24.233127593994140625,
-141.3894805908203125),
++ Vec3fEq(83.73651885986328125, -52.2005767822265625, -142.3761444091796875),
++ Vec3fEq(79.19786834716796875, -80.16802978515625, -143.114837646484375),
++ Vec3fEq(64.8477935791015625, -104.598602294921875, -137.840911865234375),
++ Vec3fEq(50.497714996337890625, -129.0291748046875, -131.45831298828125),
++ Vec3fEq(36.147632598876953125, -153.459747314453125,
-121.42321014404296875),
++ Vec3fEq(21.7975559234619140625, -177.8903350830078125,
-111.38811492919921875),
++ Vec3fEq(7.44747829437255859375, -202.3209075927734375,
-101.19382476806640625),
++ Vec3fEq(0, -215, -94.75363922119140625)
++ ));
+ }
+
+ TEST_F(DetourNavigatorNavigatorTest,
update_remove_and_update_then_find_path_should_return_path)
+@@ -639,31 +645,31 @@ namespace
+
+ EXPECT_EQ(mNavigator->findPath(mAgentHalfExtents, mStepSize, mStart, mEnd,
Flag_walk, mOut), Status::Success);
+
+- EXPECT_EQ(mPath, std::deque<osg::Vec3f>({
+- osg::Vec3f(-215, 215, 1.85963428020477294921875),
+- osg::Vec3f(-194.9653167724609375, 194.9653167724609375,
-6.57602214813232421875),
+- osg::Vec3f(-174.930633544921875, 174.930633544921875,
-15.01167774200439453125),
+- osg::Vec3f(-154.8959503173828125, 154.8959503173828125,
-23.4473361968994140625),
+- osg::Vec3f(-134.86126708984375, 134.86126708984375,
-31.8829936981201171875),
+- osg::Vec3f(-114.82657623291015625, 114.82657623291015625,
-40.3186492919921875),
+- osg::Vec3f(-94.7918853759765625, 94.7918853759765625,
-47.3990631103515625),
+- osg::Vec3f(-74.75719451904296875, 74.75719451904296875,
-53.7258148193359375),
+- osg::Vec3f(-54.722499847412109375, 54.722499847412109375,
-60.052555084228515625),
+- osg::Vec3f(-34.68780517578125, 34.68780517578125, -66.37931060791015625),
+- osg::Vec3f(-14.6531162261962890625, 14.6531162261962890625,
-72.70604705810546875),
+- osg::Vec3f(5.3815765380859375, -5.3815765380859375, -75.35065460205078125),
+- osg::Vec3f(25.41626739501953125, -25.41626739501953125,
-67.9694671630859375),
+- osg::Vec3f(45.450958251953125, -45.450958251953125, -60.5882568359375),
+- osg::Vec3f(65.48564910888671875, -65.48564910888671875,
-53.20705413818359375),
+- osg::Vec3f(85.5203399658203125, -85.5203399658203125,
-45.8258514404296875),
+- osg::Vec3f(105.55503082275390625, -105.55503082275390625,
-38.44464874267578125),
+- osg::Vec3f(125.5897216796875, -125.5897216796875, -31.063449859619140625),
+- osg::Vec3f(145.6244049072265625, -145.6244049072265625, -23.6822509765625),
+- osg::Vec3f(165.659088134765625, -165.659088134765625,
-16.3010501861572265625),
+- osg::Vec3f(185.6937713623046875, -185.6937713623046875,
-8.91985416412353515625),
+- osg::Vec3f(205.7284698486328125, -205.7284698486328125,
-1.5386505126953125),
+- osg::Vec3f(215, -215, 1.87718021869659423828125),
+- })) << mPath;
++ EXPECT_THAT(mPath, ElementsAre(
++ Vec3fEq(-215, 215, 1.85963428020477294921875),
++ Vec3fEq(-194.9653167724609375, 194.9653167724609375,
-6.57602214813232421875),
++ Vec3fEq(-174.930633544921875, 174.930633544921875,
-15.01167774200439453125),
++ Vec3fEq(-154.8959503173828125, 154.8959503173828125,
-23.4473361968994140625),
++ Vec3fEq(-134.86126708984375, 134.86126708984375, -31.8829936981201171875),
++ Vec3fEq(-114.82657623291015625, 114.82657623291015625,
-40.3186492919921875),
++ Vec3fEq(-94.7918853759765625, 94.7918853759765625, -47.3990631103515625),
++ Vec3fEq(-74.75719451904296875, 74.75719451904296875, -53.7258148193359375),
++ Vec3fEq(-54.722499847412109375, 54.722499847412109375,
-60.052555084228515625),
++ Vec3fEq(-34.68780517578125, 34.68780517578125, -66.37931060791015625),
++ Vec3fEq(-14.6531162261962890625, 14.6531162261962890625,
-72.70604705810546875),
++ Vec3fEq(5.3815765380859375, -5.3815765380859375, -75.35065460205078125),
++ Vec3fEq(25.41626739501953125, -25.41626739501953125, -67.9694671630859375),
++ Vec3fEq(45.450958251953125, -45.450958251953125, -60.5882568359375),
++ Vec3fEq(65.48564910888671875, -65.48564910888671875,
-53.20705413818359375),
++ Vec3fEq(85.5203399658203125, -85.5203399658203125, -45.8258514404296875),
++ Vec3fEq(105.55503082275390625, -105.55503082275390625,
-38.44464874267578125),
++ Vec3fEq(125.5897216796875, -125.5897216796875, -31.063449859619140625),
++ Vec3fEq(145.6244049072265625, -145.6244049072265625, -23.6822509765625),
++ Vec3fEq(165.659088134765625, -165.659088134765625,
-16.3010501861572265625),
++ Vec3fEq(185.6937713623046875, -185.6937713623046875,
-8.91985416412353515625),
++ Vec3fEq(205.7284698486328125, -205.7284698486328125, -1.5386505126953125),
++ Vec3fEq(215, -215, 1.87718021869659423828125)
++ ));
+ }
+
+ TEST_F(DetourNavigatorNavigatorTest,
update_then_find_random_point_around_circle_should_return_position)
+@@ -687,10 +693,10 @@ namespace
+
+ const auto result =
mNavigator->findRandomPointAroundCircle(mAgentHalfExtents, mStart, 100.0, Flag_walk);
+
+- ASSERT_EQ(result,
boost::optional<osg::Vec3f>(osg::Vec3f(-209.95985412597656, 129.89768981933594,
-0.26253718137741089)));
++ ASSERT_THAT(result, Optional(Vec3fEq(-209.95985412597656, 129.89768981933594,
-0.26253718137741089)));
+
+ const auto distance = (*result - mStart).length();
+
+- EXPECT_EQ(distance, 85.260780334472656) << distance;
++ EXPECT_FLOAT_EQ(distance, 85.260780334472656);
+ }
+ }
+diff --git a/apps/openmw_test_suite/detournavigator/recastmeshbuilder.cpp
b/apps/openmw_test_suite/detournavigator/recastmeshbuilder.cpp
+index af6797cf0..6c474765d 100644
+--- a/apps/openmw_test_suite/detournavigator/recastmeshbuilder.cpp
++++ b/apps/openmw_test_suite/detournavigator/recastmeshbuilder.cpp
+@@ -12,6 +12,7 @@
+ #include <BulletCollision/CollisionShapes/btCompoundShape.h>
+
+ #include <gtest/gtest.h>
++#include <gmock/gmock.h>
+
+ namespace DetourNavigator
+ {
+@@ -312,11 +313,11 @@ namespace
+ AreaType_ground
+ );
+ const auto recastMesh = builder.create(mGeneration, mRevision);
+- EXPECT_EQ(recastMesh->getVertices(), std::vector<float>({
++ EXPECT_THAT(recastMesh->getVertices(), Pointwise(FloatNear(1e-5),
std::vector<float>({
+ 0, -0.70710659027099609375, -3.535533905029296875,
+ 0, 0.707107067108154296875, -3.535533905029296875,
+ 0, 2.384185791015625e-07, -4.24264049530029296875,
+- }));
++ })));
+ EXPECT_EQ(recastMesh->getIndices(), std::vector<int>({0, 1, 2}));
+ EXPECT_EQ(recastMesh->getAreaTypes(),
std::vector<AreaType>({AreaType_ground}));
+ }
+@@ -337,11 +338,11 @@ namespace
+ AreaType_ground
+ );
+ const auto recastMesh = builder.create(mGeneration, mRevision);
+- EXPECT_EQ(recastMesh->getVertices(), std::vector<float>({
++ EXPECT_THAT(recastMesh->getVertices(), Pointwise(FloatNear(1e-5),
std::vector<float>({
+ -3.535533905029296875, -0.70710659027099609375, 0,
+ -3.535533905029296875, 0.707107067108154296875, 0,
+ -4.24264049530029296875, 2.384185791015625e-07, 0,
+- }));
++ })));
+ EXPECT_EQ(recastMesh->getIndices(), std::vector<int>({0, 1, 2}));
+ EXPECT_EQ(recastMesh->getAreaTypes(),
std::vector<AreaType>({AreaType_ground}));
+ }
+--
+GitLab
+
diff --git a/openmw-recastmesh-extra-test-epsilon.patch
b/openmw-recastmesh-extra-test-epsilon.patch
new file mode 100644
index 0000000..d06be62
--- /dev/null
+++ b/openmw-recastmesh-extra-test-epsilon.patch
@@ -0,0 +1,17 @@
+diff -rupN
openmw-openmw-0.46.0/apps/openmw_test_suite/detournavigator/recastmeshbuilder.cpp
openmw-openmw-0.46.0-patched/apps/openmw_test_suite/detournavigator/recastmeshbuilder.cpp
+---
openmw-openmw-0.46.0/apps/openmw_test_suite/detournavigator/recastmeshbuilder.cpp 2020-06-08
05:11:24.000000000 -0400
++++
openmw-openmw-0.46.0-patched/apps/openmw_test_suite/detournavigator/recastmeshbuilder.cpp 2020-09-03
15:46:02.690189048 -0400
+@@ -362,11 +362,11 @@ namespace
+ AreaType_ground
+ );
+ const auto recastMesh = builder.create(mGeneration, mRevision);
+- EXPECT_EQ(recastMesh->getVertices(), std::vector<float>({
++ EXPECT_THAT(recastMesh->getVertices(), Pointwise(FloatNear(1e-5),
std::vector<float>({
+ 1.41421353816986083984375, 0, 1.1920928955078125e-07,
+ -1.41421353816986083984375, 0, -1.1920928955078125e-07,
+ 1.1920928955078125e-07, 0, -1.41421353816986083984375,
+- }));
++ })));
+ EXPECT_EQ(recastMesh->getIndices(), std::vector<int>({0, 1, 2}));
+ EXPECT_EQ(recastMesh->getAreaTypes(),
std::vector<AreaType>({AreaType_ground}));
+ }
diff --git a/openmw.spec b/openmw.spec
index 2e9f269..94c4d08 100644
--- a/openmw.spec
+++ b/openmw.spec
@@ -27,6 +27,11 @@ Patch2: openmw-foreach-offmeshconnectionsmanager.patch
#
https://gitlab.com/OpenMW/openmw/-/commit/208a50340db5506dded60c05272ce96...
Patch3:
https://gitlab.com/OpenMW/openmw/-/commit/208a50340db5506dded60c05272ce96...
+# Apply patch to try and fix test failures on aarch64, ppc64le.
+Patch4:
https://gitlab.com/OpenMW/openmw/-/commit/ddab86d94046eab0c0713371990deb0...
+# There's at least one additional test broken, fix it.
+Patch5: openmw-recastmesh-extra-test-epsilon.patch
+
# Openmw has problems with big indian cpu
ExcludeArch: ppc64
@@ -95,6 +100,8 @@ rm -rf files/launcher/icons/
# These can probably be replaced with autosetup?
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
%build
rm -rf build