Closed stze closed 8 years ago
static functions are currently not testable. we need some improvements to make this happen:
static
#ifdef BOX_UNIT_TESTS #define STATIC #else #define STATIC static #endif
BOX_UNIT_TESTS
sb-test
connection.c
connection.h
STATIC void close_cb(uv_handle_t *handle); STATIC int connection_handle_request(struct connection *con, msgpack_object *obj); STATIC int connection_handle_response(struct connection *con, msgpack_object *obj); STATIC void connection_request_event(connection_request_event_info *info); STATIC void connection_close(struct connection *con); STATIC int parse_cb(inputstream *istream, void *data, bool eof);
@stze, can we close the issue?
static
functions are currently not testable. we need some improvements to make this happen:static
keyword in function prototype and declaration:BOX_UNIT_TESTS
compile option insb-test
cmake targetstatic
functions to a header file, e.g. forconnection.c
we would add aconnection.h
header file and add all prototypes: