summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-01-23 17:43:35 -0500
committerNick Mathewson <nickm@torproject.org>2012-01-23 17:43:35 -0500
commit3312b02036302c6dfe5eb4977fa7a642bf8ccbbe (patch)
treeeba376263827b0a859c5dc720dbca05e20a13a1a /test
parent27737d55ae3af09d3a4f6fd07521ef4b341934c8 (diff)
downloadlibevent-3312b02036302c6dfe5eb4977fa7a642bf8ccbbe.tar.gz
Check event_base correctness at end of each unit test
Diffstat (limited to 'test')
-rw-r--r--test/regress_main.c5
1 files changed, 4 insertions, 1 deletions
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);