diff options
author | Sergey Sharybin <sergey@blender.org> | 2020-12-28 19:22:37 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2020-12-29 12:38:38 +0300 |
commit | 5428ad40e8873664c61a65f73ca16f9d3c71cd74 (patch) | |
tree | 28da3b17dc189914d6d9a927f83ec4d45d5b61c0 /tests | |
parent | 81c57c9471db3785f0f6c8291ae15f1999046eaa (diff) |
Test: Add utility to do near comparison for float[2]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gtests/testing/testing.h | 7 |
1 files changed, 7 insertions, 0 deletions
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); \ |