Unverified Commit a104e7c9 authored by Matthias Vallentin's avatar Matthias Vallentin Committed by GitHub

Merge pull request #810

Fix dangling reference bug in unit test suite
parents e1f69c79 414bbbe5
...@@ -547,8 +547,8 @@ using caf_test_case_auto_fixture = caf::test::dummy_fixture; ...@@ -547,8 +547,8 @@ using caf_test_case_auto_fixture = caf::test::dummy_fixture;
#define CAF_CHECK_FUNC(func, x_expr, y_expr) \ #define CAF_CHECK_FUNC(func, x_expr, y_expr) \
do { \ do { \
func comparator; \ func comparator; \
const auto& x_val___ = x_expr; \ auto&& x_val___ = x_expr; \
const auto& y_val___ = y_expr; \ auto&& y_val___ = y_expr; \
static_cast<void>(::caf::test::detail::check( \ static_cast<void>(::caf::test::detail::check( \
::caf::test::engine::current_test(), __FILE__, __LINE__, \ ::caf::test::engine::current_test(), __FILE__, __LINE__, \
CAF_FUNC_EXPR(func, x_expr, y_expr), false, \ CAF_FUNC_EXPR(func, x_expr, y_expr), false, \
...@@ -587,8 +587,8 @@ using caf_test_case_auto_fixture = caf::test::dummy_fixture; ...@@ -587,8 +587,8 @@ using caf_test_case_auto_fixture = caf::test::dummy_fixture;
#define CAF_REQUIRE_FUNC(func, x_expr, y_expr) \ #define CAF_REQUIRE_FUNC(func, x_expr, y_expr) \
do { \ do { \
func comparator; \ func comparator; \
const auto& x_val___ = x_expr; \ auto&& x_val___ = x_expr; \
const auto& y_val___ = y_expr; \ auto&& y_val___ = y_expr; \
auto CAF_UNIQUE(__result) = ::caf::test::detail::check( \ auto CAF_UNIQUE(__result) = ::caf::test::detail::check( \
::caf::test::engine::current_test(), __FILE__, __LINE__, \ ::caf::test::engine::current_test(), __FILE__, __LINE__, \
CAF_FUNC_EXPR(func, x_expr, y_expr), false, \ CAF_FUNC_EXPR(func, x_expr, y_expr), false, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment