SimpleTestTickClock should not start at zero |
||
Issue descriptionzero is TimeBase's is_null() so almost all code assumes TickClocks don't return zero. As a result, the majority of STTC usage requires two or three lines of initialization, e.g.,: // Fake clock. Make sure start time is non zero. base::SimpleTestTickClock testing_clock; testing_clock.Advance(base::TimeDelta::FromSeconds(1)); A bunch of tests fail if we do this (https://codereview.chromium.org/2462773002/) so we should either, a) fix them all, or b) add a static factory function, e.g., SimpleTestTickClock* NewNonNullSimpleTestTickClock(). WDYT phajdan.jr@?
,
Nov 4 2016
Seems reasonable to start at one second.
,
Nov 4 2016
Thanks, sgtm. I'll probably start looking at the ones that fail.
,
Jul 6 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by w...@chromium.org
, Nov 4 2016