[Bf-blender-cvs] [5428ad40e88] master: Test: Add utility to do near comparison for float[2]
Sergey Sharybin
noreply at git.blender.org
Tue Dec 29 10:38:56 CET 2020
Commit: 5428ad40e8873664c61a65f73ca16f9d3c71cd74
Author: Sergey Sharybin
Date: Mon Dec 28 17:22:37 2020 +0100
Branches: master
https://developer.blender.org/rB5428ad40e8873664c61a65f73ca16f9d3c71cd74
Test: Add utility to do near comparison for float[2]
===================================================================
M tests/gtests/testing/testing.h
===================================================================
diff --git a/tests/gtests/testing/testing.h b/tests/gtests/testing/testing.h
index 8136a93314e..81ff4470221 100644
--- a/tests/gtests/testing/testing.h
+++ b/tests/gtests/testing/testing.h
@@ -16,6 +16,13 @@ const std::string &flags_test_release_dir(); /* bin/{blender version} in the bui
} // namespace blender::tests
+#define EXPECT_V2_NEAR(a, b, eps) \
+ { \
+ EXPECT_NEAR(a[0], b[0], eps); \
+ EXPECT_NEAR(a[1], b[1], eps); \
+ } \
+ (void)0
+
#define EXPECT_V3_NEAR(a, b, eps) \
{ \
EXPECT_NEAR(a[0], b[0], eps); \
More information about the Bf-blender-cvs
mailing list