Skip to content

Commit

Permalink
Remove ht_pp.h include from rz_list.h (#4441)
Browse files Browse the repository at this point in the history
  • Loading branch information
pelijah authored Apr 18, 2024
1 parent 2cacf88 commit 11cb44a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions librz/include/rz_cons.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern "C" {
#include <rz_vector.h>
#include <sdb.h>
#include <rz_util/ht_up.h>
#include <rz_util/ht_pp.h>

#include <stdio.h>
#include <sys/types.h>
Expand Down
1 change: 0 additions & 1 deletion librz/include/rz_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define RZ_LIST_H

#include <rz_types.h>
#include <rz_util/ht_pp.h>
#include <ls.h>

#ifdef __cplusplus
Expand Down
22 changes: 11 additions & 11 deletions test/unit/test_sdb_sdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ bool test_sdb_foreach_filter_user(void) {
sdb_set(db, "big", "horse", 0);
SdbList *ls = sdb_foreach_list_filter_user(db, foreach_filter_user_cb, true, db);
SdbListIter *it = ls_iterator(ls);
HtPPKv *kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "bar", "list should be sorted");
mu_assert_streq((const char *)kv->value, "cow", "list should be filtered");
SdbKv *kv = ls_iter_get(it);
mu_assert_streq(sdbkv_key(kv), "bar", "list should be sorted");
mu_assert_streq(sdbkv_value(kv), "cow", "list should be filtered");
kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "bip", "list should be sorted");
mu_assert_streq((const char *)kv->value, "cow", "list should be filtered");
mu_assert_streq(sdbkv_key(kv), "bip", "list should be sorted");
mu_assert_streq(sdbkv_value(kv), "cow", "list should be filtered");
kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "boo", "list should be sorted");
mu_assert_streq((const char *)kv->value, "cow", "list should be filtered");
mu_assert_streq(sdbkv_key(kv), "boo", "list should be sorted");
mu_assert_streq(sdbkv_value(kv), "cow", "list should be filtered");
mu_assert_null(it, "list should be terminated");
ls_free(ls);
sdb_free(db);
Expand All @@ -209,12 +209,12 @@ bool test_sdb_foreach_filter(void) {
sdb_set(db, "bip", "cow", 0);
SdbList *ls = sdb_foreach_list_filter(db, foreach_filter_cb, true);
SdbListIter *it = ls_iterator(ls);
HtPPKv *kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "bar", "list should be sorted");
SdbKv *kv = ls_iter_get(it);
mu_assert_streq(sdbkv_key(kv), "bar", "list should be sorted");
kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "bip", "list should be sorted");
mu_assert_streq(sdbkv_key(kv), "bip", "list should be sorted");
kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "boo", "list should be sorted");
mu_assert_streq(sdbkv_key(kv), "boo", "list should be sorted");
mu_assert_null(it, "list should be terminated");
ls_free(ls);
sdb_free(db);
Expand Down

0 comments on commit 11cb44a

Please sign in to comment.