diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-21 17:44:06 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-21 17:44:06 +0000 |
commit | f748c684765dc2e32f87a33201fb78f7fa58eb2a (patch) | |
tree | 5b83a1f7e51001ed8eb3fdc15b7f871070ce0f6b /test/lib/ch_test.c | |
parent | 0e3a108a64d9d2ac6d820f90b35a47c2d6cad2cc (diff) | |
download | ChibiOS-f748c684765dc2e32f87a33201fb78f7fa58eb2a.tar.gz ChibiOS-f748c684765dc2e32f87a33201fb78f7fa58eb2a.tar.bz2 ChibiOS-f748c684765dc2e32f87a33201fb78f7fa58eb2a.zip |
More test improvements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10867 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/lib/ch_test.c')
-rw-r--r-- | test/lib/ch_test.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/test/lib/ch_test.c b/test/lib/ch_test.c index f922146a6..f4612e421 100644 --- a/test/lib/ch_test.c +++ b/test/lib/ch_test.c @@ -225,7 +225,7 @@ void test_emit_token_i(char token) { * @api
*/
msg_t test_execute(BaseSequentialStream *stream, const testsuite_t *tsp) {
- int i, j;
+ int tseq, tcase;
test_chp = stream;
test_println("");
@@ -253,22 +253,28 @@ msg_t test_execute(BaseSequentialStream *stream, const testsuite_t *tsp) { test_println("");
test_global_fail = false;
- i = 0;
- while (tsp->sequences[i] != NULL) {
- j = 0;
- while (tsp->sequences[i]->cases[j] != NULL) {
+ tseq = 0;
+ while (tsp->sequences[tseq] != NULL) {
+ print_line();
+ test_print("--- Test Sequence ");
+ test_printn(tseq + 1);
+ test_print(" (");
+ test_print(tsp->sequences[tseq]->name);
+ test_println(")");
+ tcase = 0;
+ while (tsp->sequences[tseq]->cases[tcase] != NULL) {
print_line();
test_print("--- Test Case ");
- test_printn(i + 1);
+ test_printn(tseq + 1);
test_print(".");
- test_printn(j + 1);
+ test_printn(tcase + 1);
test_print(" (");
- test_print(tsp->sequences[i]->cases[j]->name);
+ test_print(tsp->sequences[tseq]->cases[tcase]->name);
test_println(")");
#if TEST_DELAY_BETWEEN_TESTS > 0
osalThreadSleepMilliseconds(TEST_DELAY_BETWEEN_TESTS);
#endif
- execute_test(tsp->sequences[i]->cases[j]);
+ execute_test(tsp->sequences[tseq]->cases[tcase]);
if (test_local_fail) {
test_print("--- Result: FAILURE (#");
test_printn(test_step);
@@ -278,11 +284,12 @@ msg_t test_execute(BaseSequentialStream *stream, const testsuite_t *tsp) { test_print(test_failure_message);
test_println("\")");
}
- else
+ else {
test_println("--- Result: SUCCESS");
- j++;
+ }
+ tcase++;
}
- i++;
+ tseq++;
}
print_line();
test_println("");
|