diff --git a/clock.go b/clock.go index 07fcf17..7783201 100644 --- a/clock.go +++ b/clock.go @@ -167,12 +167,12 @@ func (m *Mock) Now() time.Time { return m.now } -// Since returns time since t, using the mock clock's wall time. +// Since returns time since `t` using the mock clock's wall time. func (m *Mock) Since(t time.Time) time.Duration { return m.Now().Sub(t) } -// Until returns time until t, using the mock clock's wall time. +// Until returns time until `t` using the mock clock's wall time. func (m *Mock) Until(t time.Time) time.Duration { return t.Sub(m.Now()) } diff --git a/clock_test.go b/clock_test.go index ce5e42a..b587af7 100644 --- a/clock_test.go +++ b/clock_test.go @@ -300,11 +300,11 @@ func TestMock_Until(t *testing.T) { end := clock.Now().Add(500 * time.Second) if dur := clock.Until(end); dur.Seconds() != 500 { - t.Fatalf("expected 500 to the end, actually: %v", dur.Seconds()) + t.Fatalf("expected 500s duration between `clock` and `end`, actually: %v", dur.Seconds()) } clock.Add(100 * time.Second) if dur := clock.Until(end); dur.Seconds() != 400 { - t.Fatalf("expected 400 to the end, actually: %v", dur.Seconds()) + t.Fatalf("expected 400s duration between `clock` and `end`, actually: %v", dur.Seconds()) } }