Commit c2130ac9 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Provide more context in test failure messages.

parent 065c5910
......@@ -10,13 +10,13 @@ func TestTimeToTimeval(t *testing.T) {
date := time.Date(1960, time.January, 1, 23, 16, 44, 650951, time.UTC)
tv := timeToTimeval(&date)
if tv.Sec != -315535396 || tv.Usec != 650 {
t.Fail()
t.Errorf("got timeval %v, want (-315535396, 650)", tv)
}
// Check recent date
date = time.Date(2015, time.September, 29, 20, 8, 7, 74522, time.UTC)
tv = timeToTimeval(&date)
if tv.Sec != 1443557287 || tv.Usec != 74 {
t.Fail()
t.Errorf("got timeval %v, want (1443557287, 74)", tv)
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment