Merge branch 'bugfix/unit_test_app_print_tests_in_correct_order' into 'master'

Fix unit test app to print tests in the same order they are given in test file

This fixes the unit test app to print test cases in the same order they are given in test file. 

See merge request !460
This commit is contained in:
Angus Gratton
2017-03-13 15:43:01 +08:00

View File

@@ -39,16 +39,17 @@ void unity_flush()
void unity_testcase_register(struct test_desc_t* desc)
{
if (!s_unity_tests_first)
if (!s_unity_tests_first)
{
s_unity_tests_first = desc;
s_unity_tests_last = desc;
}
else
else
{
s_unity_tests_last->next = desc;
struct test_desc_t* temp = s_unity_tests_first;
s_unity_tests_first = desc;
s_unity_tests_first->next = temp;
}
s_unity_tests_last = desc;
desc->next = NULL;
}
static void unity_run_single_test(const struct test_desc_t* test)