| 229 | } |
| 230 | |
| 231 | static int test_query(cachedb_funcs *api, cachedb_con *con, |
| 232 | const cdb_dict_t *pairs) |
| 233 | { |
| 234 | cdb_res_t res; |
| 235 | |
| 236 | if (!ok(api->query(con, NULL, &res) == 0, "query: NULL filter")) |
| 237 | return 0; |
| 238 | |
| 239 | ok(res.count == 2, "query: 2 results"); |
| 240 | dbg_cdb_dict("pairs: ", pairs); |
| 241 | dbg_cdb_dict("res 1: ", nth_dict(&res, 1)); |
| 242 | dbg_cdb_dict("res 2: ", nth_dict(&res, 2)); |
| 243 | |
| 244 | ok(!dict_cmp(nth_dict(&res, 1), nth_dict(&res, 2)), "identical results"); |
| 245 | |
| 246 | cdb_free_rows(&res); |
| 247 | |
| 248 | return 1; |
| 249 | } |
| 250 | |
| 251 | static int test_update(cachedb_funcs *api, cachedb_con *con, |
| 252 | cdb_dict_t *out_pairs) |
no test coverage detected