Skip to content

Commit cf3e998

Browse files
authored
Remove completely unnecessary use of CLASSNAME. (#471)
This test wasn't even being run with multiple rmw implementations, so just remove the unnecessary infrastructure. Signed-off-by: Chris Lalancette <[email protected]>
1 parent f69abc1 commit cf3e998

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

test/benchmark/benchmark_logging.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@
2121
#include "osrf_testing_tools_cpp/scope_exit.hpp"
2222
#include "rcutils/logging.h"
2323

24-
#ifdef RMW_IMPLEMENTATION
25-
# define CLASSNAME_(NAME, SUFFIX) NAME ## __ ## SUFFIX
26-
# define CLASSNAME(NAME, SUFFIX) CLASSNAME_(NAME, SUFFIX)
27-
#else
28-
# define CLASSNAME(NAME, SUFFIX) NAME
29-
#endif
30-
3124
size_t g_log_calls = 0;
3225
struct LogEvent
3326
{

test/test_allocator.cpp

+4-10
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,17 @@
2121
#include "osrf_testing_tools_cpp/memory_tools/memory_tools.hpp"
2222
#include "osrf_testing_tools_cpp/scope_exit.hpp"
2323

24-
#ifdef RMW_IMPLEMENTATION
25-
# define CLASSNAME_(NAME, SUFFIX) NAME ## __ ## SUFFIX
26-
# define CLASSNAME(NAME, SUFFIX) CLASSNAME_(NAME, SUFFIX)
27-
#else
28-
# define CLASSNAME(NAME, SUFFIX) NAME
29-
#endif
30-
3124
using osrf_testing_tools_cpp::memory_tools::disable_monitoring_in_all_threads;
3225
using osrf_testing_tools_cpp::memory_tools::enable_monitoring_in_all_threads;
3326
using osrf_testing_tools_cpp::memory_tools::on_unexpected_calloc;
3427
using osrf_testing_tools_cpp::memory_tools::on_unexpected_free;
3528
using osrf_testing_tools_cpp::memory_tools::on_unexpected_malloc;
3629
using osrf_testing_tools_cpp::memory_tools::on_unexpected_realloc;
3730

38-
class CLASSNAME (TestAllocatorFixture, RMW_IMPLEMENTATION) : public ::testing::Test
31+
class TestAllocatorFixture : public ::testing::Test
3932
{
4033
public:
41-
CLASSNAME(TestAllocatorFixture, RMW_IMPLEMENTATION)() {}
34+
TestAllocatorFixture() {}
4235

4336
void SetUp()
4437
{
@@ -55,7 +48,8 @@ class CLASSNAME (TestAllocatorFixture, RMW_IMPLEMENTATION) : public ::testing::T
5548

5649
/* Tests the default allocator.
5750
*/
58-
TEST_F(CLASSNAME(TestAllocatorFixture, RMW_IMPLEMENTATION), test_default_allocator_normal) {
51+
TEST_F(TestAllocatorFixture, test_default_allocator_normal)
52+
{
5953
size_t mallocs = 0;
6054
size_t reallocs = 0;
6155
size_t callocs = 0;

0 commit comments

Comments
 (0)