From aa71db9ad03d46e6d318385a517895fc16cbc1b2 Mon Sep 17 00:00:00 2001 From: Jakub Strzebonski Date: Fri, 30 Oct 2020 19:47:00 +0100 Subject: [PATCH] #872: fix compilation error --- tests/unit/handler/test_handler.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/unit/handler/test_handler.cc b/tests/unit/handler/test_handler.cc index a3eb2fac4c..a4ca53bdbe 100644 --- a/tests/unit/handler/test_handler.cc +++ b/tests/unit/handler/test_handler.cc @@ -66,13 +66,16 @@ TEST_F(TestHandler, test_make_handler_default_params) { // Default parameters' values constexpr bool is_objgroup = false; constexpr HandlerControlType control = 0; - constexpr bool is_trace = true; constexpr bool is_member = false; EXPECT_EQ(is_objgroup, HandlerManager::isHandlerObjGroup(han)); EXPECT_EQ(control, HandlerManager::getHandlerControl(han)); - EXPECT_EQ(is_trace, HandlerManager::isHandlerTrace(han)); EXPECT_EQ(is_member, HandlerManager::isHandlerMember(han)); + +#if vt_check_enabled(trace_enabled) + constexpr bool is_trace = true; + EXPECT_EQ(is_trace, HandlerManager::isHandlerTrace(han)); +#endif } TEST_F(TestHandler, TestHandler_test_make_handler_custom_params) { @@ -93,8 +96,11 @@ TEST_F(TestHandler, TestHandler_test_make_handler_custom_params) { EXPECT_EQ(id, HandlerManager::getHandlerIdentifier(han)); EXPECT_EQ(is_objgroup, HandlerManager::isHandlerObjGroup(han)); EXPECT_EQ(control, HandlerManager::getHandlerControl(han)); - EXPECT_EQ(is_trace, HandlerManager::isHandlerTrace(han)); EXPECT_EQ(is_member, HandlerManager::isHandlerMember(han)); + +#if vt_check_enabled(trace_enabled) + EXPECT_EQ(is_trace, HandlerManager::isHandlerTrace(han)); +#endif } }}} // end namespace vt::tests::unit