Changeset View
Changeset View
Standalone View
Standalone View
tests/gtests/testing/testing.h
| #ifndef __BLENDER_TESTING_H__ | #ifndef __BLENDER_TESTING_H__ | ||||
| #define __BLENDER_TESTING_H__ | #define __BLENDER_TESTING_H__ | ||||
| #include <vector> | #include <vector> | ||||
| #include "gflags/gflags.h" | #include "gflags/gflags.h" | ||||
| #include "glog/logging.h" | #include "glog/logging.h" | ||||
| #include "gtest/gtest.h" | #include "gtest/gtest.h" | ||||
| namespace blender::tests { | |||||
| /* These strings are passed on the CLI with the --test-asset-dir and --test-release-dir arguments. | |||||
| * The arguments are added automatically when invoking tests via `ctest`. */ | |||||
| const std::string &flags_test_asset_dir(); /* ../lib/tests in the SVN directory. */ | |||||
| const std::string &flags_test_release_dir(); /* bin/{blender version} in the build directory. */ | |||||
| } // namespace blender::tests | |||||
| #define EXPECT_V3_NEAR(a, b, eps) \ | #define EXPECT_V3_NEAR(a, b, eps) \ | ||||
| { \ | { \ | ||||
| EXPECT_NEAR(a[0], b[0], eps); \ | EXPECT_NEAR(a[0], b[0], eps); \ | ||||
| EXPECT_NEAR(a[1], b[1], eps); \ | EXPECT_NEAR(a[1], b[1], eps); \ | ||||
| EXPECT_NEAR(a[2], b[2], eps); \ | EXPECT_NEAR(a[2], b[2], eps); \ | ||||
| } \ | } \ | ||||
| (void)0 | (void)0 | ||||
| ▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines | |||||