summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-02 17:54:52 +0900
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commitc9b55c3d5c7d062abd820a115ffaddd0a259e7a3 (patch)
treebea822b8f2bed4118ff7e4ba091d17bf1608d4c0 /src/test
parent3e87a4583ff4571ab79cb2d7953b1b918a9e9eb1 (diff)
set: drop unused set_make() function (#8879)
The function causes compiler error when built with '-Ddebug=hashmap', and is not used anymore. Let's drop it.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-set.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/test/test-set.c b/src/test/test-set.c
index 11884de1f..9774fbb38 100644
--- a/src/test/test-set.c
+++ b/src/test/test-set.c
@@ -66,55 +66,10 @@ static void test_set_put(void) {
assert_se(set_put(m, (void*) "22") == 0);
}
-static void test_set_make(void) {
- _cleanup_set_free_ Set *s = NULL;
-
- assert_se(set_make(&s, NULL, UINT_TO_PTR(4), UINT_TO_PTR(6), UINT_TO_PTR(8), NULL) == 0);
- assert_se(set_size(s) == 3);
- assert_se(!set_contains(s, UINT_TO_PTR(0)));
- assert_se(!set_contains(s, UINT_TO_PTR(1)));
- assert_se(!set_contains(s, UINT_TO_PTR(2)));
- assert_se(!set_contains(s, UINT_TO_PTR(3)));
- assert_se(set_contains(s, UINT_TO_PTR(4)));
- assert_se(!set_contains(s, UINT_TO_PTR(5)));
- assert_se(set_contains(s, UINT_TO_PTR(6)));
- assert_se(!set_contains(s, UINT_TO_PTR(7)));
- assert_se(set_contains(s, UINT_TO_PTR(8)));
- assert_se(!set_contains(s, UINT_TO_PTR(9)));
- s = set_free(s);
-
- assert_se(set_make(&s, NULL, NULL) == 0);
- assert_se(set_size(s) == 0);
- assert_se(!set_contains(s, UINT_TO_PTR(0)));
- assert_se(!set_contains(s, UINT_TO_PTR(4)));
- assert_se(!set_contains(s, UINT_TO_PTR(6)));
- assert_se(!set_contains(s, UINT_TO_PTR(8)));
- s = set_free(s);
-
- assert_se(set_make(&s, NULL, UINT_TO_PTR(3), NULL) == 0);
- assert_se(set_size(s) == 1);
- assert_se(!set_contains(s, UINT_TO_PTR(0)));
- assert_se(!set_contains(s, UINT_TO_PTR(1)));
- assert_se(!set_contains(s, UINT_TO_PTR(2)));
- assert_se(set_contains(s, UINT_TO_PTR(3)));
- assert_se(!set_contains(s, UINT_TO_PTR(4)));
-
- assert_se(set_make(&s, NULL, UINT_TO_PTR(2), UINT_TO_PTR(5), NULL) == 0);
- assert_se(set_size(s) == 2);
- assert_se(!set_contains(s, UINT_TO_PTR(0)));
- assert_se(!set_contains(s, UINT_TO_PTR(1)));
- assert_se(set_contains(s, UINT_TO_PTR(2)));
- assert_se(!set_contains(s, UINT_TO_PTR(3)));
- assert_se(!set_contains(s, UINT_TO_PTR(4)));
- assert_se(set_contains(s, UINT_TO_PTR(5)));
- assert_se(!set_contains(s, UINT_TO_PTR(6)));
-}
-
int main(int argc, const char *argv[]) {
test_set_steal_first();
test_set_free_with_destructor();
test_set_put();
- test_set_make();
return 0;
}