Skip to content

Commit

Permalink
Corrected casting issue with an assert within the error_handling test
Browse files Browse the repository at this point in the history
Discovered via #7105.
If both values are negative values, they are casted in such a way that -1 != -1. This small commit fixes that.
  • Loading branch information
cmonr authored Jun 13, 2018
1 parent ed9a1f1 commit 6fa5609
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TESTS/mbed_platform/error_handling/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void test_error_context_capture()
mbed_error_status_t status = mbed_get_last_error_info( &error_ctx );
TEST_ASSERT(status == MBED_SUCCESS);
TEST_ASSERT_EQUAL_UINT(error_value, error_ctx.error_value);
TEST_ASSERT_EQUAL_UINT(osThreadGetId(), error_ctx.thread_id);
TEST_ASSERT_EQUAL_UINT((uint32_t)osThreadGetId(), error_ctx.thread_id);

//Capture thread info and compare
osRtxThread_t *current_thread = osRtxInfo.thread.run.curr;
Expand Down

0 comments on commit 6fa5609

Please sign in to comment.