Re: [systemd-devel] [PATCH] test-hashmap.c: added unit-test for hashmap

2013-05-02 Thread Kay Sievers
On Thu, May 2, 2013 at 11:50 PM, Daniel Buch wrote: > Updated version Applied. Thanks a lot for doing all that, Kay ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] [PATCH] test-hashmap.c: added unit-test for hashmap

2013-05-02 Thread Daniel Buch
Updated version --- Makefile.am | 12 +- src/test/test-hashmap.c | 508 2 files changed, 519 insertions(+), 1 deletion(-) create mode 100644 src/test/test-hashmap.c diff --git a/Makefile.am b/Makefile.am index 9e0f5fb..d50ab3d 100644

Re: [systemd-devel] [PATCH] test-hashmap.c: added unit-test for hashmap

2013-05-02 Thread Kay Sievers
On Thu, May 2, 2013 at 10:31 AM, Daniel Buch wrote: > Thanks for review, kay! > > I adabted the code. So trivial_cmp() is tested with INT_TO_PTR('a') - i > guess its ok to use 'a' since its evaulated to int? > The casts.. Dont know :p they are removed :) Sounds good. You sent the update already?

Re: [systemd-devel] [PATCH] test-hashmap.c: added unit-test for hashmap

2013-05-02 Thread Daniel Buch
Thanks for review, kay! I adabted the code. So trivial_cmp() is tested with INT_TO_PTR('a') - i guess its ok to use 'a' since its evaulated to int? The casts.. Dont know :p they are removed :) 2013/4/26 Kay Sievers > On Fri, Apr 26, 2013 at 8:49 PM, Daniel Buch > wrote: > > Version 2, with le

Re: [systemd-devel] [PATCH] test-hashmap.c: added unit-test for hashmap

2013-04-26 Thread Kay Sievers
On Fri, Apr 26, 2013 at 8:49 PM, Daniel Buch wrote: > Version 2, with leak fix. This should be good enough to be pushed. > +static void test_uint64_compare_func(void) { > +assert_se((uint64_t)trivial_compare_func("a", "a") == (uint64_t)0); > +assert_se((uint64_t)trivial_compare_fu

[systemd-devel] [PATCH] test-hashmap.c: added unit-test for hashmap

2013-04-26 Thread Daniel Buch
Version 2, with leak fix. This should be good enough to be pushed. --- Makefile.am | 12 +- src/test/test-hashmap.c | 508 2 files changed, 519 insertions(+), 1 deletion(-) create mode 100644 src/test/test-hashmap.c diff --git a/Make