|
OpenThread_app
|
#include "unity_fixture.h"#include <pthread.h>#include <unistd.h>#include <sched.h>#include "ot_app_buffer.h"#include "mock_freertos_semaphore_pthread.h"Macros | |
| #define | WRITES_PER_THREAD 10000 |
| #define | TEST_OT_APP_BUF_MUTEX_ON 1 |
| #define | TEST_OT_APP_BUF_MUTEX_OFF 0 |
| #define | TEST_OTAPP_BUF_KEY_NOT_EXIST 0x3001 |
| #define | TEST_OT_APP_BUF_SIZE 32 |
Functions | |
| TEST_GROUP (ot_app_buffer) | |
| TEST_SETUP (ot_app_buffer) | |
| TEST_TEAR_DOWN (ot_app_buffer) | |
| uint16_t | test_ot_app_buff_start_multithreaded_race_condition (uint8_t mutexState) |
| TEST (ot_app_buffer, given_false_args_when_call_append_return_error) | |
| TEST (ot_app_buffer, given_key_no_exist_when_call_append_return_error) | |
| TEST (ot_app_buffer, given_too_large_buf_size_when_call_append_return_overflow) | |
| TEST (ot_app_buffer, given_tru_args_when_call_append_return_ok) | |
| TEST (ot_app_buffer, given_tru_args_when_call_append_twice_return_ok) | |
| TEST (ot_app_buffer, given_false_args_when_call_getData_return_error) | |
| TEST (ot_app_buffer, given_too_small_buf_when_call_getData_return_error) | |
| TEST (ot_app_buffer, given_correct_args_when_call_getData_return_ok) | |
| TEST (ot_app_buffer, given_false_args_when_call_getReadOnly_ptr_return_error) | |
| TEST (ot_app_buffer, given_true_args_when_call_getReadOnly_ptr_return_not_null_ptr) | |
| TEST (ot_app_buffer, given_append_when_call_getReadOnly_ptr_return_ok) | |
| TEST (ot_app_buffer, given_false_args_when_call_getWriteOnly_ptr_return_error) | |
| TEST (ot_app_buffer, given_too_large_size_when_call_getWriteOnly_ptr_return_error) | |
| TEST (ot_app_buffer, check_lock_when_call_getWriteOnly_ptr_and_append_return_error) | |
| TEST (ot_app_buffer, check_unlock_when_call_getWriteOnly_ptr_and_append_return_ok) | |
| TEST (ot_app_buffer, given_true_args_when_call_getWriteOnly_ptr_return_ok) | |
| TEST (ot_app_buffer, buffer_should_survive_multithreaded_race_condition_when_mutex_on_retorn_ok) | |
| TEST (ot_app_buffer, buffer_should_not_survive_multithreaded_race_condition_when_mutex_off_return_error) | |
| #define TEST_OT_APP_BUF_MUTEX_OFF 0 |
| #define TEST_OT_APP_BUF_MUTEX_ON 1 |
| #define TEST_OT_APP_BUF_SIZE 32 |
| #define TEST_OTAPP_BUF_KEY_NOT_EXIST 0x3001 |
| #define WRITES_PER_THREAD 10000 |
| TEST | ( | ot_app_buffer | , |
| buffer_should_not_survive_multithreaded_race_condition_when_mutex_off_return_error | ) |
| TEST | ( | ot_app_buffer | , |
| buffer_should_survive_multithreaded_race_condition_when_mutex_on_retorn_ok | ) |
| TEST | ( | ot_app_buffer | , |
| check_lock_when_call_getWriteOnly_ptr_and_append_return_error | ) |
| TEST | ( | ot_app_buffer | , |
| check_unlock_when_call_getWriteOnly_ptr_and_append_return_ok | ) |
| TEST | ( | ot_app_buffer | , |
| given_append_when_call_getReadOnly_ptr_return_ok | ) |
| TEST | ( | ot_app_buffer | , |
| given_correct_args_when_call_getData_return_ok | ) |
| TEST | ( | ot_app_buffer | , |
| given_false_args_when_call_append_return_error | ) |
| TEST | ( | ot_app_buffer | , |
| given_false_args_when_call_getData_return_error | ) |
| TEST | ( | ot_app_buffer | , |
| given_false_args_when_call_getReadOnly_ptr_return_error | ) |
| TEST | ( | ot_app_buffer | , |
| given_false_args_when_call_getWriteOnly_ptr_return_error | ) |
| TEST | ( | ot_app_buffer | , |
| given_key_no_exist_when_call_append_return_error | ) |
| TEST | ( | ot_app_buffer | , |
| given_too_large_buf_size_when_call_append_return_overflow | ) |
| TEST | ( | ot_app_buffer | , |
| given_too_large_size_when_call_getWriteOnly_ptr_return_error | ) |
| TEST | ( | ot_app_buffer | , |
| given_too_small_buf_when_call_getData_return_error | ) |
| TEST | ( | ot_app_buffer | , |
| given_tru_args_when_call_append_return_ok | ) |
| TEST | ( | ot_app_buffer | , |
| given_tru_args_when_call_append_twice_return_ok | ) |
| TEST | ( | ot_app_buffer | , |
| given_true_args_when_call_getReadOnly_ptr_return_not_null_ptr | ) |
| TEST | ( | ot_app_buffer | , |
| given_true_args_when_call_getWriteOnly_ptr_return_ok | ) |
| TEST_GROUP | ( | ot_app_buffer | ) |
| uint16_t test_ot_app_buff_start_multithreaded_race_condition | ( | uint8_t | mutexState | ) |
| TEST_SETUP | ( | ot_app_buffer | ) |
| TEST_TEAR_DOWN | ( | ot_app_buffer | ) |