From a153874d18806733b14bd45df60f0de6716e77b3 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 26 Apr 2013 13:49:45 -0400 Subject: [PATCH] New test for active_later->active transition on event_active When event_active is called, an active_later event is supposed to become active now. We had lacked a test for that. --- test/regress.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/regress.c b/test/regress.c index bfd2e78b..961bc064 100644 --- a/test/regress.c +++ b/test/regress.c @@ -1407,6 +1407,12 @@ test_active_later(void *ptr) tt_int_op(n_read_and_drain_cb, >, 100); tt_int_op(n_activate_other_event_cb, >, 100); + event_active_later_(&ev4, EV_READ); + event_active(&ev4, EV_READ, 1); /* This should make the event + active immediately. */ + tt_assert((ev4.ev_flags & EVLIST_ACTIVE) != 0); + tt_assert((ev4.ev_flags & EVLIST_ACTIVE_LATER) == 0); + /* Now leave this one around, so that event_free sees it and removes * it. */ event_active_later_(&ev3, EV_READ); -- 2.50.1