Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2017-10-16 12:16:13 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2017-10-16 12:22:35 +0300
commita78b3ee53aa53020b086a6df25c0e28491223dcc (patch)
treebd883e95580f5777f7eae7cac4e47f182ac9fc00 /tests/gtests/testing/testing.h
parent4842cc017c3bb7df2070c2f96605190ff88e6a2e (diff)
parent49f4ac17bf704614de59a4db7a65c205c085d694 (diff)
Merge remote-tracking branch 'origin/master' into openvdbopenvdb
Diffstat (limited to 'tests/gtests/testing/testing.h')
-rw-r--r--tests/gtests/testing/testing.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/gtests/testing/testing.h b/tests/gtests/testing/testing.h
index 1594ed3926c..d5a7b076970 100644
--- a/tests/gtests/testing/testing.h
+++ b/tests/gtests/testing/testing.h
@@ -12,6 +12,29 @@
EXPECT_NEAR(a[2], b[2], eps); \
} (void) 0
+#define EXPECT_V4_NEAR(a, b, eps) \
+{ \
+ EXPECT_NEAR(a[0], b[0], eps); \
+ EXPECT_NEAR(a[1], b[1], eps); \
+ EXPECT_NEAR(a[2], b[2], eps); \
+ EXPECT_NEAR(a[3], b[3], eps); \
+ } (void) 0
+
+#define EXPECT_M3_NEAR(a, b, eps) \
+do { \
+ EXPECT_V3_NEAR(a[0], b[0], eps); \
+ EXPECT_V3_NEAR(a[1], b[1], eps); \
+ EXPECT_V3_NEAR(a[2], b[2], eps); \
+} while(false);
+
+#define EXPECT_M4_NEAR(a, b, eps) \
+do { \
+ EXPECT_V3_NEAR(a[0], b[0], eps); \
+ EXPECT_V3_NEAR(a[1], b[1], eps); \
+ EXPECT_V3_NEAR(a[2], b[2], eps); \
+ EXPECT_V4_NEAR(a[3], b[3], eps); \
+} while(false);
+
#define EXPECT_MATRIX_NEAR(a, b, tolerance) \
do { \
bool dims_match = (a.rows() == b.rows()) && (a.cols() == b.cols()); \