Changeset 134ac5d in mainline for uspace/lib/pcut/src/list.c
- Timestamp:
- 2014-06-06T07:54:24Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8db09e4
- Parents:
- eeb23f2d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcut/src/list.c
reeb23f2d r134ac5d 35 35 #include <stdlib.h> 36 36 #include "internal.h" 37 #include <pcut/ test.h>37 #include <pcut/pcut.h> 38 38 39 39 … … 118 118 } 119 119 120 /** Hide tests that are marked to be skipped. 121 * 122 * Go through all tests and those that have PCUT_EXTRA_SKIP mark 123 * as skipped with PCUT_KIND_SKIP. 124 * 125 * @param first Head of the list. 126 */ 127 static void detect_skipped_tests(pcut_item_t *first) { 128 assert(first != NULL); 129 if (first->kind == PCUT_KIND_SKIP) { 130 first = pcut_get_real_next(first); 131 } 132 for (pcut_item_t *it = first; it != NULL; it = pcut_get_real_next(it)) { 133 if (it->kind != PCUT_KIND_TEST) { 134 continue; 135 } 136 pcut_extra_t *extras = it->test.extras; 137 while (extras->type != PCUT_EXTRA_LAST) { 138 if (extras->type == PCUT_EXTRA_SKIP) { 139 it->kind = PCUT_KIND_SKIP; 140 break; 141 } 142 extras++; 143 } 144 } 145 } 146 120 147 /** Convert the static single-linked list into a flat double-linked list. 121 148 * … … 143 170 } 144 171 172 detect_skipped_tests(next); 173 145 174 set_ids(next); 146 175
Note:
See TracChangeset
for help on using the changeset viewer.