utils.h (533B)
1 #ifndef TEST_UTILS_H 2 #define TEST_UTILS_H 3 4 #include <jansson.h> 5 #include <stdint.h> 6 #include <stdlib.h> 7 #include <string.h> 8 9 #include <assert.h> 10 11 #include "../address.h" 12 13 int read_array(uint8_t **data, size_t *ndata, const json_t *array); 14 int read_key_array(void *data, const size_t ndata, const char *key, json_t *tv); 15 int read_key_aoa(void *data, const size_t ndata, const char *key, json_t *tv); 16 uint64_t read_key_uint64(const char *key, const json_t *tv); 17 idx_tree_t read_key_idx_tree(const char *key, const json_t *tv); 18 19 #endif