(t *testing.T)
| 21 | ) |
| 22 | |
| 23 | func TestComparators(t *testing.T) { |
| 24 | t1a := TimeFromUnix(0) |
| 25 | t1b := TimeFromUnix(0) |
| 26 | t2 := TimeFromUnix(2*second - 1) |
| 27 | |
| 28 | if !t1a.Equal(t1b) { |
| 29 | t.Fatalf("Expected %s to be equal to %s", t1a, t1b) |
| 30 | } |
| 31 | if t1a.Equal(t2) { |
| 32 | t.Fatalf("Expected %s to not be equal to %s", t1a, t2) |
| 33 | } |
| 34 | |
| 35 | if !t1a.Before(t2) { |
| 36 | t.Fatalf("Expected %s to be before %s", t1a, t2) |
| 37 | } |
| 38 | if t1a.Before(t1b) { |
| 39 | t.Fatalf("Expected %s to not be before %s", t1a, t1b) |
| 40 | } |
| 41 | |
| 42 | if !t2.After(t1a) { |
| 43 | t.Fatalf("Expected %s to be after %s", t2, t1a) |
| 44 | } |
| 45 | if t1b.After(t1a) { |
| 46 | t.Fatalf("Expected %s to not be after %s", t1b, t1a) |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | func TestTimeConversions(t *testing.T) { |
| 51 | unixSecs := int64(1136239445) |
nothing calls this directly
no test coverage detected