3 #include "../sf0x_parser.h" 31 const char _LINE_MAX = 20;
35 const char *lines[] = {
"0.01\r\n",
55 char _parserbuf[_LINE_MAX];
56 unsigned _parsebuf_index = 0;
58 for (
unsigned l = 0; l <
sizeof(lines) /
sizeof(lines[0]); l++) {
63 for (
int i = 0; i < (ssize_t)strlen(lines[l]); i++) {
64 parse_ret =
sf0x_parser(lines[l][i], _parserbuf, &_parsebuf_index, &state, &dist_m);
#define ut_declare_test_c(test_function, test_class)
int sf0x_parser(char c, char *parserbuf, unsigned *parserbuf_index, enum SF0X_PARSE_STATE *state, float *dist)
Base class to be used for unit tests.
int _tests_failed
The number of unit tests which failed.
#define ut_test(test)
Used to assert a value within a unit test.
__EXPORT int sf0x_tests_main(int argc, char *argv[])
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
Simple error/warning functions, heavily inspired by the BSD functions of the same names...
virtual bool run_tests()
Override to run your unit tests.
#define ut_run_test(test)
Runs a single unit test.