Changes in kernel/test/test.c [0949b7a:e8d48d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/test.c
r0949b7a re8d48d2 34 34 35 35 #include <test.h> 36 #include <str.h> 36 37 37 38 bool test_quiet; … … 68 69 }; 69 70 71 const char* tests_hints_enum(const char *input, const char **help, 72 void **ctx) 73 { 74 size_t len = str_length(input); 75 test_t **test = (test_t**)ctx; 76 77 if (*test == NULL) 78 *test = tests; 79 80 for (; (*test)->name; (*test)++) { 81 const char *curname = (*test)->name; 82 83 if (str_length(curname) < len) 84 continue; 85 86 if (str_lcmp(input, curname, len) == 0) { 87 (*test)++; 88 if (help) 89 *help = (*test)->desc; 90 return (curname + str_lsize(curname, len)); 91 } 92 } 93 94 return NULL; 95 } 96 70 97 /** @} 71 98 */
Note:
See TracChangeset
for help on using the changeset viewer.