| 1 |
<meta charset="utf-8"><link rel="stylesheet" href="apidoc.css"/> |
| 2 |
|
| 3 |
**µTest — A small C testing library** |
| 4 |
|
| 5 |
* [Main](./mutest.md.html) |
| 6 |
|
| 7 |
## Value Wrappers |
| 8 |
|
| 9 |
### Includes |
| 10 |
|
| 11 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 12 |
#include <mutest.h> |
| 13 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 14 |
|
| 15 |
### Functions |
| 16 |
|
| 17 |
#### `mutest_bool_value` |
| 18 |
|
| 19 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 20 |
mutest_expect_res_t * |
| 21 |
mutest_bool_value (bool value); |
| 22 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 23 |
|
| 24 |
Wraps a boolean value to pass to `mutest_expect()`. |
| 25 |
|
| 26 |
value |
| 27 |
: a boolean scalar |
| 28 |
return value |
| 29 |
: a newly allocated `mutest_expect_res_t` |
| 30 |
|
| 31 |
---- |
| 32 |
|
| 33 |
#### `mutest_get_bool_value` |
| 34 |
|
| 35 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 36 |
bool |
| 37 |
mutest_get_bool_value (const mutest_expect_res_t *res); |
| 38 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 39 |
|
| 40 |
Retrieves the boolean value in the `res` wrapper. |
| 41 |
|
| 42 |
res |
| 43 |
: a `mutest_expect_res_t` |
| 44 |
return value |
| 45 |
: a boolean value |
| 46 |
|
| 47 |
---- |
| 48 |
|
| 49 |
#### `mutest_int_value` |
| 50 |
|
| 51 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 52 |
mutest_expect_res_t * |
| 53 |
mutest_int_value (int value); |
| 54 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 55 |
|
| 56 |
Wraps an integer value to pass to `mutest_expect()`. |
| 57 |
|
| 58 |
value |
| 59 |
: an integer scalar |
| 60 |
return value |
| 61 |
: a newly allocated `mutest_expect_res_t` |
| 62 |
|
| 63 |
---- |
| 64 |
|
| 65 |
#### `mutest_get_int_value` |
| 66 |
|
| 67 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 68 |
int |
| 69 |
mutest_get_int_value (const mutest_expect_res_t *res); |
| 70 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 71 |
|
| 72 |
Retrieves the integer value in the `res` wrapper. |
| 73 |
|
| 74 |
res |
| 75 |
: a `mutest_expect_res_t` |
| 76 |
return value |
| 77 |
: an integer value |
| 78 |
|
| 79 |
---- |
| 80 |
|
| 81 |
#### `mutest_string_value` |
| 82 |
|
| 83 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 84 |
mutest_expect_res_t * |
| 85 |
mutest_string_value (const char *value); |
| 86 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 87 |
|
| 88 |
Wraps a C string to pass to `mutest_expect()`. |
| 89 |
|
| 90 |
value |
| 91 |
: a C string |
| 92 |
return value |
| 93 |
: a newly allocated `mutest_expect_res_t` |
| 94 |
|
| 95 |
---- |
| 96 |
|
| 97 |
#### `mutest_get_string_value` |
| 98 |
|
| 99 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 100 |
const char * |
| 101 |
mutest_get_string_value (const mutest_expect_res_t *res); |
| 102 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 103 |
|
| 104 |
Retrieves the string in the `res` wrapper. |
| 105 |
|
| 106 |
res |
| 107 |
: a `mutest_expect_res_t` |
| 108 |
return value |
| 109 |
: a string |
| 110 |
|
| 111 |
---- |
| 112 |
|
| 113 |
#### `mutest_float_value` |
| 114 |
|
| 115 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 116 |
mutest_expect_res_t * |
| 117 |
mutest_float_value (double value); |
| 118 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 119 |
|
| 120 |
Wraps a floating point value to pass to `mutest_expect()`. |
| 121 |
|
| 122 |
value |
| 123 |
: a floating point value |
| 124 |
return value |
| 125 |
: a newly allocated `mutest_expect_res_t` |
| 126 |
|
| 127 |
---- |
| 128 |
|
| 129 |
#### `mutest_get_float_value` |
| 130 |
|
| 131 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 132 |
double |
| 133 |
mutest_get_float_value (const mutest_expect_res_t *res); |
| 134 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 135 |
|
| 136 |
Retrieves the floating point value in the `res` wrapper. |
| 137 |
|
| 138 |
res |
| 139 |
: a `mutest_expect_res_t` |
| 140 |
return value |
| 141 |
: a floating point value |
| 142 |
|
| 143 |
---- |
| 144 |
|
| 145 |
#### `mutest_int_range` |
| 146 |
|
| 147 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 148 |
mutest_expect_res_t * |
| 149 |
mutest_int_range (int min, |
| 150 |
int max); |
| 151 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 152 |
|
| 153 |
Wraps a range of integers between `min` and `max`, inclusive, |
| 154 |
to pass to mutest_expect(). |
| 155 |
|
| 156 |
min |
| 157 |
: the minimum value of a range |
| 158 |
max |
| 159 |
: the maximum value of a range |
| 160 |
return value |
| 161 |
: a newly allocated `mutest_expect_res_t` |
| 162 |
|
| 163 |
---- |
| 164 |
|
| 165 |
#### `mutest_get_int_range` |
| 166 |
|
| 167 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 168 |
void |
| 169 |
mutest_get_int_range (const mutest_expect_res_t *res, |
| 170 |
int *min, |
| 171 |
int *max); |
| 172 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 173 |
|
| 174 |
Retrieves the range in the result wrapper. |
| 175 |
|
| 176 |
res |
| 177 |
: a `mutest_expect_res_t` |
| 178 |
min |
| 179 |
: return location for the minimum value of the range |
| 180 |
max |
| 181 |
: return location for the maximum value of the range |
| 182 |
|
| 183 |
---- |
| 184 |
|
| 185 |
#### `mutest_float_range` |
| 186 |
|
| 187 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 188 |
mutest_expect_res_t * |
| 189 |
mutest_float_range (double min, |
| 190 |
double max); |
| 191 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 192 |
|
| 193 |
Wraps a range of floating point values between @min and @max, |
| 194 |
inclusive, to pass to mutest_expect(). |
| 195 |
|
| 196 |
min |
| 197 |
: the minimum value of a range |
| 198 |
max |
| 199 |
: the maximum value of a range |
| 200 |
return value |
| 201 |
: a newly allocated `mutest_expect_res_t` |
| 202 |
|
| 203 |
---- |
| 204 |
|
| 205 |
#### `mutest_get_float_range` |
| 206 |
|
| 207 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 208 |
void |
| 209 |
mutest_get_float_range (const mutest_expect_res_t *res, |
| 210 |
double *min, |
| 211 |
double *max); |
| 212 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 213 |
|
| 214 |
Retrieves the range in the result wrapper. |
| 215 |
|
| 216 |
res |
| 217 |
: a `mutest_expect_res_t` |
| 218 |
min |
| 219 |
: return location for the minimum value of the range |
| 220 |
max |
| 221 |
: return location for the maximum value of the range |
| 222 |
|
| 223 |
---- |
| 224 |
|
| 225 |
#### `mutest_pointer` |
| 226 |
|
| 227 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 228 |
mutest_expect_res_t * |
| 229 |
mutest_pointer (const void *pointer); |
| 230 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 231 |
|
| 232 |
Wraps a pointer to pass to mutest_expect(). |
| 233 |
|
| 234 |
pointer |
| 235 |
: a generic pointer |
| 236 |
return value |
| 237 |
: a newly allocated `mutest_expect_res_t` |
| 238 |
|
| 239 |
---- |
| 240 |
|
| 241 |
#### `mutest_get_pointer` |
| 242 |
|
| 243 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 244 |
const void * |
| 245 |
mutest_get_pointer (const mutest_expect_res_t *res); |
| 246 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 247 |
|
| 248 |
Retrieves the pointer value in the result wrapper. |
| 249 |
|
| 250 |
res |
| 251 |
: a `mutest_expect_res_` |
| 252 |
return value |
| 253 |
: a pointer value |
| 254 |
|
| 255 |
<style class="fallback">body{visibility:hidden}</style><script>markdeepOptions={tocStyle:'medium'};</script> |
| 256 |
<!-- Markdeep: --><script src="markdeep.min.js" charset="utf-8"></script> |