From: Nick Mathewson Date: Tue, 21 Apr 2009 18:48:05 +0000 (+0000) Subject: Make sure the test case for mem_functions hits strdup too. X-Git-Tag: release-2.0.3-alpha~292 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=133a015dba3d80c99de89ac427108a783179b871;p=libevent Make sure the test case for mem_functions hits strdup too. svn:r1218 --- diff --git a/test/regress.c b/test/regress.c index 9dc9ffa7..2a9d2507 100644 --- a/test/regress.c +++ b/test/regress.c @@ -1575,11 +1575,16 @@ static void test_mm_functions(void *arg) { struct event_base *b = NULL; + struct event_config *cfg = NULL; event_set_mem_functions(dummy_malloc, dummy_realloc, dummy_free); - b = event_base_new(); + cfg = event_config_new(); + event_config_avoid_method(cfg, "Nonesuch"); + b = event_base_new_with_config(cfg); tt_assert(b); tt_assert(check_dummy_mem_ok(b)); end: + if (cfg) + event_config_free(cfg); if (b) event_base_free(b); }