Skip to content

Commit 8d88bb0

Browse files
author
Cruz Monrreal
authored
Merge pull request #7202 from ARMmbed/cmonr-patch-error_handling-test
Corrected casting issue with an assert within the error_handling test
2 parents 10d9f7f + e93aaab commit 8d88bb0

File tree

1 file changed

+8
-3
lines changed
  • TESTS/mbed_platform/error_handling

1 file changed

+8
-3
lines changed

TESTS/mbed_platform/error_handling/main.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
#include "greentea-client/test_env.h"
1718
#include "utest/utest.h"
1819
#include "unity/unity.h"
@@ -124,7 +125,7 @@ void test_error_context_capture()
124125
mbed_error_status_t status = mbed_get_last_error_info( &error_ctx );
125126
TEST_ASSERT(status == MBED_SUCCESS);
126127
TEST_ASSERT_EQUAL_UINT(error_value, error_ctx.error_value);
127-
TEST_ASSERT_EQUAL_UINT(osThreadGetId(), error_ctx.thread_id);
128+
TEST_ASSERT_EQUAL_UINT((uint32_t)osThreadGetId(), error_ctx.thread_id);
128129

129130
//Capture thread info and compare
130131
osRtxThread_t *current_thread = osRtxInfo.thread.run.curr;
@@ -346,15 +347,19 @@ utest::v1::status_t test_setup(const size_t number_of_cases)
346347
Case cases[] = {
347348
Case("Test error counting and reset", test_error_count_and_reset),
348349
Case("Test error encoding, value capture, first and last errors", test_error_capturing),
350+
#if MBED_CONF_RTOS_PRESENT
349351
Case("Test error context capture", test_error_context_capture),
352+
#endif //MBED_CONF_RTOS_PRESENT
350353
Case("Test error hook", test_error_hook),
351354
#ifndef MBED_CONF_ERROR_HIST_DISABLED
352355
Case("Test error logging", test_error_logging),
356+
#if MBED_CONF_RTOS_PRESENT
353357
Case("Test error handling multi-threaded", test_error_logging_multithread),
358+
#endif //MBED_CONF_RTOS_PRESENT
354359
#ifdef MBED_TEST_SIM_BLOCKDEVICE
355360
Case("Test error save log", test_save_error_log),
356-
#endif
357-
#endif
361+
#endif //MBED_TEST_SIM_BLOCKDEVICE
362+
#endif //MBED_CONF_ERROR_HIST_DISABLED
358363
};
359364

360365
utest::v1::Specification specification(test_setup, cases);

0 commit comments

Comments
 (0)