test for next_or_previous_event