Utilities
Utilities header only library
GTestHelpers.h
1
#ifndef UTILS_GTEST_HELPERS_H
2
#define UTILS_GTEST_HELPERS_H
3
4
#define GTEST_TEST_GLM_(expression, commands, actual, expected, fail) \
5
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
6
if (const ::testing::AssertionResult gtest_ar_ = \
7
::testing::AssertionResult(expression)); \
8
else \
9
fail(::testing::internal::GetBoolAssertionFailureMessage(\
10
gtest_ar_, commands, actual, expected).c_str())
11
12
#define EXPECT_EQ_GLM(actual, expected) \
13
GTEST_TEST_GLM_(glm_ext::AreEqual(actual, expected), std::string(std::string(#actual)+" and "+std::string(#expected)).c_str(), glm_ext::to_string(actual).c_str(), glm_ext::to_string(expected).c_str(), GTEST_NONFATAL_FAILURE_)
14
15
16
#define EXPECT_EQ_GLM_EPSILON(actual, expected, epsilon) \
17
GTEST_TEST_GLM_(glm_ext::AreEqual(actual, expected, epsilon), std::string(std::string(#actual)+" and "+std::string(#expected)).c_str(), glm_ext::to_string(actual).c_str(), glm_ext::to_string(expected).c_str(), GTEST_NONFATAL_FAILURE_)
18
19
#endif
/* !UTILS_GTEST_HELPERS_H */
libs
Utils
include
Utils
GTestHelpers.h
Generated by
1.8.13