test-hashmap.c revision 2eec67acbb00593e414549a7e5b35eb7dd776b1b
/***
This file is part of systemd
Copyright 2013 Daniel Buch
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "util.h"
#include "hashmap.h"
void test_hashmap_funcs(void);
void test_ordered_hashmap_funcs(void);
static void test_ordered_hashmap_next(void) {
OrderedHashmap *m;
r = ordered_hashmap_next(m, "key 1");
r = ordered_hashmap_next(m, "key 2");
r = ordered_hashmap_next(m, "key 3");
r = ordered_hashmap_next(m, "key 4");
assert_se(!r);
assert_se(!r);
r = ordered_hashmap_next(m, "key 5");
assert_se(!r);
}
static void test_uint64_compare_func(void) {
assert_se(uint64_compare_func(&a, &a) == 0);
}
static void test_trivial_compare_func(void) {
}
static void test_string_compare_func(void) {
}
}