Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to use new memory_tools from osrf_testing_tools_cpp #101

Merged
merged 7 commits into from
Jun 12, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/test_logging_macros.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int main(int argc, char ** argv)
rcutils_logging_get_output_handler();
rcutils_logging_set_output_handler(custom_handler);

RCUTILS_LOG_INFO("empty message");
size_t line_number = __LINE__; RCUTILS_LOG_INFO("empty message");
if (g_log_calls != 1u) {
return 3;
}
Expand All @@ -72,7 +72,7 @@ int main(int argc, char ** argv)
if (strcmp(g_last_log_event.location->function_name, "main")) {
return 5;
}
if (g_last_log_event.location->line_number != 65u) {
if (g_last_log_event.location->line_number != line_number) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhood FYI I changed this too, does that seem ok to you?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFTM

return 6;
}
if (g_last_log_event.severity != RCUTILS_LOG_SEVERITY_INFO) {
Expand All @@ -85,7 +85,7 @@ int main(int argc, char ** argv)
return 9;
}

RCUTILS_LOG_INFO("message %s", "foo");
line_number = __LINE__; RCUTILS_LOG_INFO("message %s", "foo");
if (g_log_calls != 2u) {
return 10;
}
Expand All @@ -95,7 +95,7 @@ int main(int argc, char ** argv)
if (strcmp(g_last_log_event.location->function_name, "main")) {
return 12;
}
if (g_last_log_event.location->line_number != 88u) {
if (g_last_log_event.location->line_number != line_number) {
return 13;
}
if (g_last_log_event.severity != RCUTILS_LOG_SEVERITY_INFO) {
Expand Down