From: Manuel Nickschas Date: Thu, 4 Oct 2018 16:40:23 +0000 (+0200) Subject: test: Add InvocationSpy and ValueSpy helper classes X-Git-Tag: test-travis-01~112 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=34e58425ffb5475b210abb484970e674ddb98744;hp=34e58425ffb5475b210abb484970e674ddb98744 test: Add InvocationSpy and ValueSpy helper classes For test cases testing asynchronous operations that require a running event loop, it is convenient to have a way to wait until something happens. Qt provides QSignalSpy to wait for a specific signal while spinning the event loop. This is not always convenient to use, though. Provide InvocationSpy and ValueSpy (based on QSignalSpy) that provide an explicit way of notifying them, without having to connect a signal first. Unlike QSignalSpy, those classes also time out when not notified within a given time span. Put those classes in a new library Quassel::Test::Util, which will gain more testing-related utils over time. ---