Skip to content
  • Nat Goodspeed's avatar
    Add LLEventThrottle tests; actually *all* lleventfilter.cpp tests. · 9c66072c
    Nat Goodspeed authored
    For some reason there wasn't an entry in indra/llcommon/CMakeLists.txt to run
    the tests in indra/llcommon/tests/lleventfilter_test.cpp. It seems likely that
    at some point it existed, since all previous tests built and ran successfully.
    In any case, (re-)add lleventfilter_test.cpp to the set of llcommon tests.
    Also alphabetize them to make it easier to find a particular test invocation.
    
    Also add new tests for LLEventThrottle.
    
    To support this, refactor the concrete LLEventThrottle class into
    LLEventThrottleBase containing all the tricky logic, with pure virtual
    methods for access to LLTimer and LLEventTimeout, and an LLEventThrottle
    subclass containing the LLTimer and LLEventTimeout instances and corresponding
    implementations of the new pure virtual methods.
    
    That permits us to introduce TestEventThrottle, an alternate subclass with
    dummy implementations of the methods related to LLTimer and LLEventTimeout. In
    particular, we can explicitly advance simulated realtime to simulate
    particular LLTimer and LLEventTimeout behaviors.
    
    Finally, introduce Concat, a test LLEventPump listener class whose function is
    to concatenate received string event data into a composite string so we can
    readily test for particular sequences of events.
    9c66072c