mirror of https://github.com/poanetwork/gecko.git
utils: Initialise Clock with go defaults in TestClockSet
Changed to be more idiomatic, addresses PR feedback.
This commit is contained in:
parent
52e3d427a1
commit
8f54a7c1d8
|
@ -6,12 +6,12 @@ import (
|
|||
)
|
||||
|
||||
func TestClockSet(t *testing.T) {
|
||||
clock := Clock{false, time.Unix(1000000, 0)}
|
||||
clock.Set(time.Unix(0, 0))
|
||||
clock := Clock{}
|
||||
clock.Set(time.Unix(1000000, 0))
|
||||
if clock.faked == false {
|
||||
t.Error("Fake time was set, but .faked flag was not set")
|
||||
}
|
||||
if !clock.Time().Equal(time.Unix(0, 0)) {
|
||||
if !clock.Time().Equal(time.Unix(1000000, 0)) {
|
||||
t.Error("Fake time was set, but not returned")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue