Changeset 4b54bd9 in mainline for uspace/lib/pcut/src/report/tap.c
- Timestamp:
- 2018-09-12T13:23:03Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3da0ee4
- Parents:
- 275530a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcut/src/report/tap.c
r275530a4 r4b54bd9 34 34 #include "../internal.h" 35 35 #include "report.h" 36 36 37 #ifndef __helenos__ 38 #pragma warning(push, 0) 37 39 #include <string.h> 40 #pragma warning(pop) 38 41 #endif 42 43 #pragma warning(push, 0) 39 44 #include <stdio.h> 45 #pragma warning(pop) 46 40 47 41 48 /** Counter of all run tests. */ … … 55 62 * @param all_items Start of the list with all items. 56 63 */ 57 static void tap_init(pcut_item_t *all_items) 58 { 64 static void tap_init(pcut_item_t *all_items) { 59 65 int tests_total = pcut_count_tests(all_items); 60 66 test_counter = 0; … … 68 74 * @param suite Suite that just started. 69 75 */ 70 static void tap_suite_start(pcut_item_t *suite) 71 { 76 static void tap_suite_start(pcut_item_t *suite) { 72 77 tests_in_suite = 0; 73 78 failed_tests_in_suite = 0; … … 80 85 * @param suite Suite that just ended. 81 86 */ 82 static void tap_suite_done(pcut_item_t *suite) 83 { 87 static void tap_suite_done(pcut_item_t *suite) { 84 88 if (failed_tests_in_suite == 0) { 85 89 printf("#> Finished suite %s (passed).\n", 86 90 suite->name); 87 91 } else { 88 92 printf("#> Finished suite %s (failed %d of %d).\n", 89 93 suite->name, failed_tests_in_suite, tests_in_suite); 90 94 } 91 95 } … … 97 101 * @param test Test that is started. 98 102 */ 99 static void tap_test_start(pcut_item_t *test) 100 { 103 static void tap_test_start(pcut_item_t *test) { 101 104 PCUT_UNUSED(test); 102 105 … … 110 113 * @param prefix Prefix for each new line, such as comment character. 111 114 */ 112 static void print_by_lines(const char *message, const char *prefix) 113 { 115 static void print_by_lines(const char *message, const char *prefix) { 114 116 char *next_line_start; 115 117 if ((message == NULL) || (message[0] == 0)) { … … 137 139 */ 138 140 static void tap_test_done(pcut_item_t *test, int outcome, 139 const char *error_message, const char *teardown_error_message, 140 const char *extra_output) 141 { 141 const char *error_message, const char *teardown_error_message, 142 const char *extra_output) { 142 143 const char *test_name = test->name; 143 144 const char *status_str = NULL; … … 172 173 173 174 /** Report testing done. */ 174 static void tap_done(void) 175 { 175 static void tap_done(void) { 176 176 if (failed_test_counter == 0) { 177 177 printf("#> Done: all tests passed.\n");
Note:
See TracChangeset
for help on using the changeset viewer.