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:
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()); \