[tests] Test that Timer::stop on a stopped timer is a no-op

This commit is contained in:
John Firebaugh
2016-01-07 20:46:46 -08:00
parent 656eb8766c
commit 4b7db28157

View File

@@ -177,3 +177,11 @@ TEST(Timer, StartOverrides) {
EXPECT_GE(totalTime, expectedTotalTime * 0.8);
EXPECT_LE(totalTime, expectedTotalTime * 1.2);
}
TEST(Timer, CanStopNonStartedTimer) {
RunLoop loop;
Timer timer;
timer.unref();
timer.stop();
}