5 #include <gtest/gtest.h> 12 template <
typename T>
static bool EQ3(T x, T y0, T y1, T y2) {
13 if (x == y0)
return true;
14 if (x == y1)
return true;
15 if (x == y2)
return true;
35 #if 0 // Fails to compile in ROS Indigo: "call of overloaded ‘PlatformMap(<brace-enclosed initializer list>)’ is ambiguous" 120 EXPECT_TRUE(
EQ3(
x.findPlatform(mx),
PlatformVersion(px,mx,
ModuleVersion(10,11,12)),
PlatformVersion(py,mx,
ModuleVersion(40,41,42)),
PlatformVersion(pz,mx,
ModuleVersion(70,71,72))));
121 EXPECT_TRUE(
EQ3(
x.findPlatform(my),
PlatformVersion(px,my,
ModuleVersion(20,21,22)),
PlatformVersion(py,my,
ModuleVersion(50,51,52)),
PlatformVersion(pz,my,
ModuleVersion(80,81,82))));
122 EXPECT_TRUE(
EQ3(
x.findPlatform(mz),
PlatformVersion(px,mz,
ModuleVersion(30,31,32)),
PlatformVersion(py,mz,
ModuleVersion(60,61,62)),
PlatformVersion(pz,mz,
ModuleVersion(90,91,92))));
172 int main(
int argc,
char **argv)
174 testing::InitGoogleTest(&argc, argv);
175 return RUN_ALL_TESTS();
TFSIMD_FORCE_INLINE const tfScalar & x() const