Changeset 134ac5d in mainline for uspace/lib/pcut/src/internal.h
- 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/internal.h
reeb23f2d r134ac5d 27 27 */ 28 28 29 /** @file 30 * Common definitions internally used in PCUT. 31 */ 32 29 33 #ifndef PCUT_INTERNAL_H_GUARD 30 34 #define PCUT_INTERNAL_H_GUARD 31 35 32 #include <pcut/ test.h>36 #include <pcut/pcut.h> 33 37 #include <stdlib.h> 34 38 … … 69 73 pcut_item_t *pcut_get_real_next(pcut_item_t *item); 70 74 pcut_item_t *pcut_get_real(pcut_item_t *item); 71 const char* pcut_run_test(pcut_test_func_t function);72 const char* pcut_run_setup_teardown(pcut_setup_func_t function);73 75 void pcut_print_tests(pcut_item_t *first); 74 76 int pcut_is_arg_with_number(const char *arg, const char *opt, int *value); … … 78 80 int pcut_run_test_single(pcut_item_t *test); 79 81 80 extern pcut_item_t *pcut_current_test; 81 extern pcut_item_t *pcut_current_suite; 82 extern int pcut_running_test_now; 83 extern int pcut_running_setup_now; 82 int pcut_get_test_timeout(pcut_item_t *test); 84 83 84 void pcut_failed_assertion(const char *message); 85 85 void pcut_print_fail_message(const char *msg); 86 86 87 /** Reporting callbacks structure. */ 87 88 typedef struct pcut_report_ops pcut_report_ops_t; 88 /** Reporting callbacks structure. */ 89 90 /** @copydoc pcut_report_ops_t */ 89 91 struct pcut_report_ops { 90 92 /** Initialize the reporting, given all tests. */ … … 116 118 void pcut_report_done(void); 117 119 120 /* OS-dependent functions. */ 118 121 122 /** Tell whether two strings start with the same prefix. 123 * 124 * @param a First string. 125 * @param b Second string. 126 * @param len Length of common prefix. 127 * @return Whether first @p len characters of @p a are the same as in @p b. 128 */ 119 129 int pcut_str_start_equals(const char *a, const char *b, int len); 130 131 /** Get size of string in bytes. 132 * 133 * @param s String in question. 134 * @return Size of @p s in bytes. 135 */ 120 136 int pcut_str_size(const char *s); 137 138 /** Convert string to integer. 139 * 140 * @param s String with integer. 141 * @return Converted integer. 142 */ 121 143 int pcut_str_to_int(const char *s); 144 145 /** Find character in a string. 146 * 147 * @param haystack Where to look for the @p needle. 148 * @param needle Character to find. 149 * @return String starting with @p needle. 150 * @retval NULL there is no @p needle in @p haystack. 151 */ 122 152 char *pcut_str_find_char(const char *haystack, const char needle); 123 153
Note:
See TracChangeset
for help on using the changeset viewer.