From 3312b02036302c6dfe5eb4977fa7a642bf8ccbbe Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 23 Jan 2012 17:43:35 -0500 Subject: [PATCH] Check event_base correctness at end of each unit test --- test/regress_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/regress_main.c b/test/regress_main.c index d129d7c2..43c2d333 100644 --- a/test/regress_main.c +++ b/test/regress_main.c @@ -76,6 +76,7 @@ #include "tinytest.h" #include "tinytest_macros.h" #include "../iocp-internal.h" +#include "../event-internal.h" long timeval_msec_diff(const struct timeval *start, const struct timeval *end) @@ -254,8 +255,10 @@ basic_test_cleanup(const struct testcase_t *testcase, void *ptr) } if (testcase->flags & TT_NEED_BASE) { - if (data->base) + if (data->base) { + event_base_assert_ok(data->base); event_base_free(data->base); + } } free(data);