diff options
author | Russ Cox <rsc@golang.org> | 2009-10-08 15:14:54 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-10-08 15:14:54 -0700 |
commit | 79244ca7360f32db37710ab74c72214146397edf (patch) | |
tree | 0f7c5551b95f4e5dd567a4ac3233afeb0da61e99 /src/pkg/time/time_test.go | |
parent | 71b9ef8c235f052495a1fb29bd3945f7094998a9 (diff) | |
download | golang-79244ca7360f32db37710ab74c72214146397edf.tar.gz |
more lgtm files from gofmt
R=gri
OCL=35485
CL=35488
Diffstat (limited to 'src/pkg/time/time_test.go')
-rw-r--r-- | src/pkg/time/time_test.go | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/pkg/time/time_test.go b/src/pkg/time/time_test.go index 2c80a716d..8a90f5d7a 100644 --- a/src/pkg/time/time_test.go +++ b/src/pkg/time/time_test.go @@ -5,9 +5,9 @@ package time_test import ( - "os"; - "testing"; - . "time"; + "os"; + "testing"; + . "time"; ) func init() { @@ -18,35 +18,35 @@ func init() { } type TimeTest struct { - seconds int64; - golden Time; + seconds int64; + golden Time; } -var utctests = []TimeTest { +var utctests = []TimeTest{ TimeTest{0, Time{1970, 1, 1, 0, 0, 0, Thursday, 0, "UTC"}}, TimeTest{1221681866, Time{2008, 9, 17, 20, 4, 26, Wednesday, 0, "UTC"}}, TimeTest{-1221681866, Time{1931, 4, 16, 3, 55, 34, Thursday, 0, "UTC"}}, TimeTest{1e18, Time{31688740476, 10, 23, 1, 46, 40, Friday, 0, "UTC"}}, TimeTest{-1e18, Time{-31688736537, 3, 10, 22, 13, 20, Tuesday, 0, "UTC"}}, TimeTest{0x7fffffffffffffff, Time{292277026596, 12, 4, 15, 30, 7, Sunday, 0, "UTC"}}, - TimeTest{-0x8000000000000000, Time{-292277022657, 1, 27, 8, 29, 52, Sunday, 0, "UTC"}} + TimeTest{-0x8000000000000000, Time{-292277022657, 1, 27, 8, 29, 52, Sunday, 0, "UTC"}}, } -var localtests = []TimeTest { - TimeTest{0, Time{1969, 12, 31, 16, 0, 0, Wednesday, -8*60*60, "PST"}}, - TimeTest{1221681866, Time{2008, 9, 17, 13, 4, 26, Wednesday, -7*60*60, "PDT"}} +var localtests = []TimeTest{ + TimeTest{0, Time{1969, 12, 31, 16, 0, 0, Wednesday, -8 * 60 * 60, "PST"}}, + TimeTest{1221681866, Time{2008, 9, 17, 13, 4, 26, Wednesday, -7 * 60 * 60, "PDT"}}, } func same(t, u *Time) bool { - return t.Year == u.Year - && t.Month == u.Month - && t.Day == u.Day - && t.Hour == u.Hour - && t.Minute == u.Minute - && t.Second == u.Second - && t.Weekday == u.Weekday - && t.ZoneOffset == u.ZoneOffset - && t.Zone == u.Zone + return t.Year == u.Year && + t.Month == u.Month && + t.Day == u.Day && + t.Hour == u.Hour && + t.Minute == u.Minute && + t.Second == u.Second && + t.Weekday == u.Weekday && + t.ZoneOffset == u.ZoneOffset && + t.Zone == u.Zone; } func TestSecondsToUTC(t *testing.T) { @@ -82,4 +82,3 @@ func TestSecondsToLocalTime(t *testing.T) { } } } - |