Adding the ability to use a simulated clock for unit tests.

This will be useful for any tests that test objects with time-dependent
behavior. It will allow such tests to be written in such a way that their
outcome is more repeatable (less flaky), and will also allow such tests
to finish quicker. For example, a test for STUN timeout doesn't need to
wait the full timeout interval in real time; it can simply advance the
simulated clock.

BUG=webrtc:4925
R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1895933003 .

Cr-Commit-Position: refs/heads/master@{#12950}
This commit is contained in:
Taylor Brandstetter
2016-05-27 14:15:43 -07:00
parent 1c20610ede
commit b3c6810be3
10 changed files with 460 additions and 9 deletions

View File

@ -13,6 +13,7 @@
namespace rtc {
// TODO(deadbeef): Remove this and use ClockInterface instead.
class Timing {
public:
Timing();