mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #7202 from ARMmbed/cmonr-patch-error_handling-test
Corrected casting issue with an assert within the error_handling testpull/7224/head
commit
8d88bb0ba5
|
@ -13,6 +13,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "greentea-client/test_env.h"
|
#include "greentea-client/test_env.h"
|
||||||
#include "utest/utest.h"
|
#include "utest/utest.h"
|
||||||
#include "unity/unity.h"
|
#include "unity/unity.h"
|
||||||
|
@ -124,7 +125,7 @@ void test_error_context_capture()
|
||||||
mbed_error_status_t status = mbed_get_last_error_info( &error_ctx );
|
mbed_error_status_t status = mbed_get_last_error_info( &error_ctx );
|
||||||
TEST_ASSERT(status == MBED_SUCCESS);
|
TEST_ASSERT(status == MBED_SUCCESS);
|
||||||
TEST_ASSERT_EQUAL_UINT(error_value, error_ctx.error_value);
|
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
|
//Capture thread info and compare
|
||||||
osRtxThread_t *current_thread = osRtxInfo.thread.run.curr;
|
osRtxThread_t *current_thread = osRtxInfo.thread.run.curr;
|
||||||
|
@ -346,15 +347,19 @@ utest::v1::status_t test_setup(const size_t number_of_cases)
|
||||||
Case cases[] = {
|
Case cases[] = {
|
||||||
Case("Test error counting and reset", test_error_count_and_reset),
|
Case("Test error counting and reset", test_error_count_and_reset),
|
||||||
Case("Test error encoding, value capture, first and last errors", test_error_capturing),
|
Case("Test error encoding, value capture, first and last errors", test_error_capturing),
|
||||||
|
#if MBED_CONF_RTOS_PRESENT
|
||||||
Case("Test error context capture", test_error_context_capture),
|
Case("Test error context capture", test_error_context_capture),
|
||||||
|
#endif //MBED_CONF_RTOS_PRESENT
|
||||||
Case("Test error hook", test_error_hook),
|
Case("Test error hook", test_error_hook),
|
||||||
#ifndef MBED_CONF_ERROR_HIST_DISABLED
|
#ifndef MBED_CONF_ERROR_HIST_DISABLED
|
||||||
Case("Test error logging", test_error_logging),
|
Case("Test error logging", test_error_logging),
|
||||||
|
#if MBED_CONF_RTOS_PRESENT
|
||||||
Case("Test error handling multi-threaded", test_error_logging_multithread),
|
Case("Test error handling multi-threaded", test_error_logging_multithread),
|
||||||
|
#endif //MBED_CONF_RTOS_PRESENT
|
||||||
#ifdef MBED_TEST_SIM_BLOCKDEVICE
|
#ifdef MBED_TEST_SIM_BLOCKDEVICE
|
||||||
Case("Test error save log", test_save_error_log),
|
Case("Test error save log", test_save_error_log),
|
||||||
#endif
|
#endif //MBED_TEST_SIM_BLOCKDEVICE
|
||||||
#endif
|
#endif //MBED_CONF_ERROR_HIST_DISABLED
|
||||||
};
|
};
|
||||||
|
|
||||||
utest::v1::Specification specification(test_setup, cases);
|
utest::v1::Specification specification(test_setup, cases);
|
||||||
|
|
Loading…
Reference in New Issue