From: Nick Mathewson Date: Mon, 9 Nov 2009 18:36:34 +0000 (+0000) Subject: Unit tests for got_break and got_exit. X-Git-Tag: release-2.0.3-alpha~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2fe4aedaae559761b5818a964b63deae02dbdf0;p=libevent Unit tests for got_break and got_exit. svn:r1521 --- diff --git a/test/regress.c b/test/regress.c index 1c41de40..f5fc93e5 100644 --- a/test/regress.c +++ b/test/regress.c @@ -1155,9 +1155,13 @@ test_loopexit(void) evtimer_del(&ev); + tt_assert(event_base_got_exit(global_base)); + tt_assert(!event_base_got_break(global_base)); + if (tv.tv_sec < 2) test_ok = 1; +end: cleanup_test(); } @@ -1183,8 +1187,12 @@ test_loopexit_multiple(void) event_base_free(base); + tt_assert(event_base_got_exit(base)); + tt_assert(!event_base_got_break(base)); + test_ok = 1; +end: cleanup_test(); } @@ -1218,9 +1226,13 @@ test_loopbreak(void) event_dispatch(); + tt_assert(!event_base_got_exit(global_base)); + tt_assert(event_base_got_break(global_base)); + evtimer_del(&ev1); evtimer_del(&ev2); +end: cleanup_test(); }