Code clean-up

This commit is contained in:
sheinz 2016-10-25 17:52:15 +03:00
parent 9d2649b77b
commit 3b7a26fa3e
4 changed files with 22 additions and 30 deletions

View file

@ -224,8 +224,8 @@ static uint32_t IRAM inner_string_test(const char *string, test_with_fn_t testfn
const char *expected = testfn(string); const char *expected = testfn(string);
TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, buf, testfn_label); TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, buf, testfn_label);
if(evict_cache) { if(evict_cache) {
Cache_Read_Disable(); Cache_Read_Disable();
Cache_Read_Enable(0,0,1); Cache_Read_Enable(0,0,1);
} }
} }
uint32_t after; uint32_t after;

View file

@ -42,9 +42,10 @@ void testcase_register(const testcase_t *testcase)
memcpy(&testcases[testcases_count++], testcase, sizeof(testcase_t)); memcpy(&testcases[testcases_count++], testcase, sizeof(testcase_t));
} }
static void test_task(void *pvParameters) void user_init(void)
{ {
uart_set_baud(0, 115200); uart_set_baud(0, 115200);
sdk_wifi_set_opmode(NULL_MODE);
printf("esp-open-rtos test runner.\n"); printf("esp-open-rtos test runner.\n");
printf("%d test cases are defined:\n\n", testcases_count); printf("%d test cases are defined:\n\n", testcases_count);
for(int i = 0; i < testcases_count; i++) { for(int i = 0; i < testcases_count; i++) {
@ -118,13 +119,4 @@ static void test_task(void *pvParameters)
testcase.a_fn(); testcase.a_fn();
else else
testcase.b_fn(); testcase.b_fn();
/* TEST_FAIL_MESSAGE("\n\nTest initialisation routine returned" */
/* " without calling TEST_PASS. Buggy test?"); */
}
void user_init(void)
{
sdk_wifi_set_opmode(NULL_MODE);
test_task(0);
/* xTaskCreate(test_task, (signed char *)"test_task", 512, NULL, 2, NULL); */
} }