diff --git a/rcl/src/rcl/subscription.c b/rcl/src/rcl/subscription.c index 57a6b8c..72d46c8 100644 --- a/rcl/src/rcl/subscription.c +++ b/rcl/src/rcl/subscription.c @@ -50,7 +50,7 @@ rcl_subscription_init( RCL_CHECK_ARGUMENT_FOR_NULL(topic_name, RCL_RET_INVALID_ARGUMENT); RCL_CHECK_ARGUMENT_FOR_NULL(options, RCL_RET_INVALID_ARGUMENT); if (subscription->impl) { - RCL_SET_ERROR_MSG("subscription already initialized, or memory was uninialized"); + RCL_SET_ERROR_MSG("subscription already initialized, or memory was uninitialized"); return RCL_RET_ALREADY_INIT; } const rcl_allocator_t * allocator = &options->allocator; diff --git a/rcl/test/memory_tools.cpp b/rcl/test/memory_tools.cpp index b95338f..17fd508 100644 --- a/rcl/test/memory_tools.cpp +++ b/rcl/test/memory_tools.cpp @@ -122,19 +122,19 @@ void assert_no_malloc_begin() {} void assert_no_malloc_end() {} -void set_on_unepexcted_malloc_callback(UnexpectedCallbackType callback) {} +void set_on_unexpected_malloc_callback(UnexpectedCallbackType callback) {} void assert_no_realloc_begin() {} void assert_no_realloc_end() {} -void set_on_unepexcted_realloc_callback(UnexpectedCallbackType callback) {} +void set_on_unexpected_realloc_callback(UnexpectedCallbackType callback) {} void assert_no_free_begin() {} void assert_no_free_end() {} -void set_on_unepexcted_free_callback(UnexpectedCallbackType callback) {} +void set_on_unexpected_free_callback(UnexpectedCallbackType callback) {} void memory_checking_thread_init() {} diff --git a/rcl/test/memory_tools.hpp b/rcl/test/memory_tools.hpp index 9941f63..001c110 100644 --- a/rcl/test/memory_tools.hpp +++ b/rcl/test/memory_tools.hpp @@ -70,7 +70,7 @@ void assert_no_malloc_end(); RCL_MEMORY_TOOLS_PUBLIC void -set_on_unepexcted_malloc_callback(UnexpectedCallbackType callback); +set_on_unexpected_malloc_callback(UnexpectedCallbackType callback); #define ASSERT_NO_REALLOC(statements) \ assert_no_realloc_begin(); statements; assert_no_realloc_end(); @@ -82,7 +82,7 @@ void assert_no_realloc_end(); RCL_MEMORY_TOOLS_PUBLIC void -set_on_unepexcted_realloc_callback(UnexpectedCallbackType callback); +set_on_unexpected_realloc_callback(UnexpectedCallbackType callback); #define ASSERT_NO_FREE(statements) \ assert_no_free_begin(); statements; assert_no_free_end(); @@ -94,7 +94,7 @@ void assert_no_free_end(); RCL_MEMORY_TOOLS_PUBLIC void -set_on_unepexcted_free_callback(UnexpectedCallbackType callback); +set_on_unexpected_free_callback(UnexpectedCallbackType callback); RCL_MEMORY_TOOLS_PUBLIC void diff --git a/rcl/test/memory_tools_common.cpp b/rcl/test/memory_tools_common.cpp index 03a2772..8789a75 100644 --- a/rcl/test/memory_tools_common.cpp +++ b/rcl/test/memory_tools_common.cpp @@ -31,7 +31,7 @@ static std::atomic enabled(false); static __thread bool malloc_expected = true; static __thread UnexpectedCallbackType * unexpected_malloc_callback = nullptr; -void set_on_unepexcted_malloc_callback(UnexpectedCallbackType callback) +void set_on_unexpected_malloc_callback(UnexpectedCallbackType callback) { if (unexpected_malloc_callback) { unexpected_malloc_callback->~UnexpectedCallbackType(); @@ -73,7 +73,7 @@ custom_malloc(size_t size) static __thread bool realloc_expected = true; static __thread UnexpectedCallbackType * unexpected_realloc_callback = nullptr; -void set_on_unepexcted_realloc_callback(UnexpectedCallbackType callback) +void set_on_unexpected_realloc_callback(UnexpectedCallbackType callback) { if (unexpected_realloc_callback) { unexpected_realloc_callback->~UnexpectedCallbackType(); @@ -115,7 +115,7 @@ custom_realloc(void * memory_in, size_t size) static __thread bool free_expected = true; static __thread UnexpectedCallbackType * unexpected_free_callback = nullptr; -void set_on_unepexcted_free_callback(UnexpectedCallbackType callback) +void set_on_unexpected_free_callback(UnexpectedCallbackType callback) { if (unexpected_free_callback) { unexpected_free_callback->~UnexpectedCallbackType(); diff --git a/rcl/test/rcl/test_allocator.cpp b/rcl/test/rcl/test_allocator.cpp index ecf1bd6..b9ca12a 100644 --- a/rcl/test/rcl/test_allocator.cpp +++ b/rcl/test/rcl/test_allocator.cpp @@ -28,9 +28,9 @@ public: } void SetUp() { - set_on_unepexcted_malloc_callback([]() {EXPECT_FALSE(true) << "UNEXPECTED MALLOC";}); - set_on_unepexcted_realloc_callback([]() {EXPECT_FALSE(true) << "UNEXPECTED REALLOC";}); - set_on_unepexcted_free_callback([]() {EXPECT_FALSE(true) << "UNEXPECTED FREE";}); + set_on_unexpected_malloc_callback([]() {EXPECT_FALSE(true) << "UNEXPECTED MALLOC";}); + set_on_unexpected_realloc_callback([]() {EXPECT_FALSE(true) << "UNEXPECTED REALLOC";}); + set_on_unexpected_free_callback([]() {EXPECT_FALSE(true) << "UNEXPECTED FREE";}); start_memory_checking(); } @@ -40,9 +40,9 @@ public: assert_no_realloc_end(); assert_no_free_end(); stop_memory_checking(); - set_on_unepexcted_malloc_callback(nullptr); - set_on_unepexcted_realloc_callback(nullptr); - set_on_unepexcted_free_callback(nullptr); + set_on_unexpected_malloc_callback(nullptr); + set_on_unexpected_realloc_callback(nullptr); + set_on_unexpected_free_callback(nullptr); } }; @@ -59,13 +59,13 @@ TEST_F(TestAllocatorFixture, test_default_allocator_normal) { size_t mallocs = 0; size_t reallocs = 0; size_t frees = 0; - set_on_unepexcted_malloc_callback([&mallocs]() { + set_on_unexpected_malloc_callback([&mallocs]() { mallocs++; }); - set_on_unepexcted_realloc_callback([&reallocs]() { + set_on_unexpected_realloc_callback([&reallocs]() { reallocs++; }); - set_on_unepexcted_free_callback([&frees]() { + set_on_unexpected_free_callback([&frees]() { frees++; }); assert_no_malloc_begin(); diff --git a/rcl/test/rcl/test_rcl.cpp b/rcl/test/rcl/test_rcl.cpp index aa8c7b4..42b634c 100644 --- a/rcl/test/rcl/test_rcl.cpp +++ b/rcl/test/rcl/test_rcl.cpp @@ -24,9 +24,9 @@ class TestRCLFixture : public::testing::Test public: void SetUp() { - set_on_unepexcted_malloc_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED MALLOC";}); - set_on_unepexcted_realloc_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED REALLOC";}); - set_on_unepexcted_free_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED FREE";}); + set_on_unexpected_malloc_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED MALLOC";}); + set_on_unexpected_realloc_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED REALLOC";}); + set_on_unexpected_free_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED FREE";}); start_memory_checking(); } @@ -36,9 +36,9 @@ public: assert_no_realloc_end(); assert_no_free_end(); stop_memory_checking(); - set_on_unepexcted_malloc_callback(nullptr); - set_on_unepexcted_realloc_callback(nullptr); - set_on_unepexcted_free_callback(nullptr); + set_on_unexpected_malloc_callback(nullptr); + set_on_unexpected_realloc_callback(nullptr); + set_on_unexpected_free_callback(nullptr); } }; diff --git a/rcl/test/rcl/test_time.cpp b/rcl/test/rcl/test_time.cpp index 54b33fc..0ff333c 100644 --- a/rcl/test/rcl/test_time.cpp +++ b/rcl/test/rcl/test_time.cpp @@ -26,9 +26,9 @@ class TestTimeFixture : public::testing::Test public: void SetUp() { - set_on_unepexcted_malloc_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED MALLOC";}); - set_on_unepexcted_realloc_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED REALLOC";}); - set_on_unepexcted_free_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED FREE";}); + set_on_unexpected_malloc_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED MALLOC";}); + set_on_unexpected_realloc_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED REALLOC";}); + set_on_unexpected_free_callback([]() {ASSERT_FALSE(true) << "UNEXPECTED FREE";}); start_memory_checking(); } @@ -38,9 +38,9 @@ public: assert_no_realloc_end(); assert_no_free_end(); stop_memory_checking(); - set_on_unepexcted_malloc_callback(nullptr); - set_on_unepexcted_realloc_callback(nullptr); - set_on_unepexcted_free_callback(nullptr); + set_on_unexpected_malloc_callback(nullptr); + set_on_unexpected_realloc_callback(nullptr); + set_on_unexpected_free_callback(nullptr); } }; diff --git a/rcl/test/test_memory_tools.cpp b/rcl/test/test_memory_tools.cpp index 1c03b03..dcddaa3 100644 --- a/rcl/test/test_memory_tools.cpp +++ b/rcl/test/test_memory_tools.cpp @@ -23,17 +23,17 @@ TEST(TestMemoryTools, test_allocation_checking_tools) { auto on_unexpected_malloc = ([&unexpected_mallocs]() { unexpected_mallocs++; }); - set_on_unepexcted_malloc_callback(on_unexpected_malloc); + set_on_unexpected_malloc_callback(on_unexpected_malloc); size_t unexpected_reallocs = 0; auto on_unexpected_realloc = ([&unexpected_reallocs]() { unexpected_reallocs++; }); - set_on_unepexcted_realloc_callback(on_unexpected_realloc); + set_on_unexpected_realloc_callback(on_unexpected_realloc); size_t unexpected_frees = 0; auto on_unexpected_free = ([&unexpected_frees]() { unexpected_frees++; }); - set_on_unepexcted_free_callback(on_unexpected_free); + set_on_unexpected_free_callback(on_unexpected_free); void * mem = nullptr; void * remem = nullptr; // First try before enabling, should have no effect.