int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_get_colon, "test_get_colon" }, { test_get_equal_sign, "test_get_equal_sign" }, { test_get_long, "test_get_long" }, { test_get_float, "test_get_float" }, { test_get_line_termination, "test_get_line_termination" }, { test_get_null_after_section, "test_get_null_after_section" }, { test_get_missing_section_termination, "test_get_missing_section_termination" }, { test_get_comments, "test_get_comments" }, { test_get_whitespace, "test_get_whitespace" }, { test_get_bad_property_format, "test_get_bad_property_format" }, { test_get_value_too_long, "test_get_value_too_long" }, { test_get_complex, "test_get_complex" }, { test_set, "test_set" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_init, "test_init" }, { test_write_escape, "test_write_escape" }, { test_write_at, "test_write_at" }, { test_write_tx_request, "test_write_tx_request" }, { test_read_unescape, "test_read_unescape" }, { test_frame_type_as_string, "test_frame_type_as_string" }, { test_tx_status_as_string, "test_tx_status_as_string" }, { test_modem_status_as_string, "test_modem_status_as_string" }, { test_at_command_response_status_as_string, "test_at_command_response_status_as_string" }, { test_frame_as_string, "test_frame_as_string" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_init, "test_init" }, { test_format, "test_format" }, { test_mount, "test_mount" }, { test_print, "test_print" }, { test_file_operations, "test_file_operations" }, { test_create_multiple_files, "test_create_multiple_files" }, { test_reopen, "test_reopen" }, { test_directory, "test_directory" }, { test_bad_file, "test_bad_file" }, { test_truncate, "test_truncate" }, { test_append, "test_append" }, { test_seek, "test_seek" }, { test_unmount, "test_unmount" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
static int test_all(struct harness_t *harness_p) { struct time_t timeout = { .seconds = 0, .nanoseconds = 0 }; sem_init(&sem, 1, 1); sem_init(&sem2, 2, 2); /* 1. Take all resources. */ BTASSERT(sem_take(&sem, &timeout) == -ETIMEDOUT); /* Create two thrds with higher priority than this thrd. */ thrd_spawn(sem_main, NULL, -10, t0_stack, sizeof(t0_stack)); thrd_spawn(sem_main, NULL, -10, t1_stack, sizeof(t1_stack)); /* 3. Wait until both threads are waiting for sem. */ sem_take(&sem2, NULL); sem_take(&sem2, NULL); /* 4. Start both threads. */ sem_give(&sem, 2); /* 6. Wait for both threads. */ sem_take(&sem2, NULL); sem_take(&sem2, NULL); return (0); } int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_all, "test_all" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_add_get_remove, "test_add_get_remove" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t testcases[] = { { test_list_devices, "test_list_devices" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_client, "test_client" }, { test_server, "test_server" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_read_write, "test_read_write" }, { NULL, NULL } }; sys_start(); flash_module_init(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_get_temp, "test_get_temp" }, { NULL, NULL } }; sys_start(); ds18b20_module_init(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_automatic, "test_automatic" }, { NULL, NULL } }; sys_start(); uart_module_init(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t testcases[] = { { test_init, "test_init" }, { test_read, "test_read" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_exti, "test_exti" }, { NULL, NULL } }; sys_start(); exti_module_init(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_init, "test_init" }, { test_write, "test_write" }, { NULL, NULL } }; sys_start(); analog_output_pin_module_init(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_init, "test_init" }, { test_rising, "test_rising" }, { test_falling, "test_falling" }, { test_both, "test_both" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t testcases[] = { { test_ramp, "test_ramp" }, { test_sine_440_hz, "test_sine_440_hz" }, { test_pcm1611s, "test_pcm1611s" }, { NULL, NULL } }; sys_start(); dac_module_init(); harness_init(&harness); harness_run(&harness, testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_init, "test_init" }, { test_scan, "test_scan" }, { test_read_write_sizes, "test_read_write_sizes" }, { test_read_write_low_high, "test_read_write_low_high" }, { test_read_write_bad_address, "test_read_write_bad_address" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_alloc_free, "test_alloc_free" }, { test_double_free, "test_double_free" }, { test_share, "test_share" }, { test_big_buffer, "test_big_buffer" }, { test_out_of_memory, "test_out_of_memory" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_print, "test_print" }, { test_object, "test_object" }, { test_handler, "test_handler" }, { test_log_mask, "test_log_mask" }, { test_fs, "test_fs" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_host_by_ip_address, "test_host_by_ip_address" }, { test_bad_reply_crc, "test_bad_reply_crc" }, { test_cmd_ping, "test_cmd_ping" }, { test_cmd_ping_bad_reply, "test_cmd_ping_bad_reply" }, { test_cmd_ping_bad_input, "test_cmd_ping_bad_input" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_filter, "test_filter" }, { test_null_channels, "test_null_channels" }, { test_list, "test_list" }, { test_getc, "test_getc" }, { test_putc, "test_putc" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_init, "test_init" }, { test_connect, "test_connect" }, { test_ping, "test_ping" }, { test_publish, "test_publish" }, { test_subscribe, "test_subscribe" }, { test_disconnect, "test_disconnect" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_init, "test_init" }, { test_duty_cycles, "test_duty_cycles" }, { test_duty_cycle_min, "test_duty_cycle_min" }, { test_duty_cycle_max, "test_duty_cycle_max" }, { test_frequency, "test_frequency" }, { test_duty_cycle_convert, "test_duty_cycle_convert" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_start, "test_start" }, { test_read, "test_read" }, { test_write, "test_write" }, { test_read_timeout, "test_read_timeout" }, { test_write_timeout, "test_write_timeout" }, { test_bad_request, "test_bad_request" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_start, "test_start" }, { test_connect, "test_connect" }, { test_write, "test_write" }, { test_disconnect, "test_disconnect" }, { test_stop, "test_stop" }, { NULL, NULL } }; sys_start(); sdio_module_init(); bcm43362_module_init(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_init, "test_init" }, { test_read_cid, "test_read_cid" }, { test_read_csd, "test_read_csd" }, { test_read_write, "test_read_write" }, { test_write_performance, "test_write_performance" }, { test_read_performance, "test_read_performance" }, { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); BTASSERT(sd_stop(&sd) == 0); return (0); }
int main() { struct harness_t harness; struct harness_testcase_t harness_testcases[] = { { test_init, "test_init" }, #if !defined(BOARD_ARDUINO_NANO) && !defined(BOARD_ARDUINO_UNO) && !defined(BOARD_ARDUINO_PRO_MICRO) { test_suspend_resume, "test_suspend_resume" }, #endif { test_yield, "test_yield" }, { test_sleep, "test_sleep" }, { test_priority, "test_priority" }, #if !defined(BOARD_ARDUINO_NANO) && !defined(BOARD_ARDUINO_UNO) && !defined(BOARD_ARDUINO_PRO_MICRO) { test_log_mask, "test_log_mask" }, # if CONFIG_PREEMPTIVE_SCHEDULER == 1 { test_preemptive, "test_preemptive" }, # endif # if CONFIG_THRD_ENV == 1 { test_env, "test_env" }, # endif { test_get_by_name, "test_get_by_name" }, { test_stack_top_bottom, "test_stack_top_bottom" }, # if CONFIG_MONITOR_THREAD == 1 { test_monitor_thread, "test_monitor_thread" }, # endif { test_stack_heap, "test_stack_heap" }, { test_prio_list, "test_prio_list" }, #endif { NULL, NULL } }; sys_start(); harness_init(&harness); harness_run(&harness, harness_testcases); return (0); }