@@ -190,9 +190,9 @@ func TestMicroTimeEqualTime(t *testing.T) {
|
|||||||
func TestMicroTimeBefore(t *testing.T) {
|
func TestMicroTimeBefore(t *testing.T) {
|
||||||
t1 := NewMicroTime(time.Now())
|
t1 := NewMicroTime(time.Now())
|
||||||
cases := []struct {
|
cases := []struct {
|
||||||
name string
|
name string
|
||||||
x *MicroTime
|
x *MicroTime
|
||||||
y *MicroTime
|
y *MicroTime
|
||||||
}{
|
}{
|
||||||
{"nil <? nil", nil, nil},
|
{"nil <? nil", nil, nil},
|
||||||
{"!nil <? !nil", &t1, &t1},
|
{"!nil <? !nil", &t1, &t1},
|
||||||
@@ -213,9 +213,9 @@ func TestMicroTimeBeforeTime(t *testing.T) {
|
|||||||
t1 := NewMicroTime(time.Now())
|
t1 := NewMicroTime(time.Now())
|
||||||
t2 := NewTime(t1.Time)
|
t2 := NewTime(t1.Time)
|
||||||
cases := []struct {
|
cases := []struct {
|
||||||
name string
|
name string
|
||||||
x *MicroTime
|
x *MicroTime
|
||||||
y *Time
|
y *Time
|
||||||
}{
|
}{
|
||||||
{"nil <? nil", nil, nil},
|
{"nil <? nil", nil, nil},
|
||||||
{"!nil <? !nil", &t1, &t2},
|
{"!nil <? !nil", &t1, &t2},
|
||||||
@@ -247,9 +247,9 @@ func TestMicroTimeIsZero(t *testing.T) {
|
|||||||
for _, c := range cases {
|
for _, c := range cases {
|
||||||
t.Run(c.name, func(t *testing.T) {
|
t.Run(c.name, func(t *testing.T) {
|
||||||
result := c.x.IsZero()
|
result := c.x.IsZero()
|
||||||
if result != c.result{
|
if result != c.result {
|
||||||
t.Errorf("Failed equality test for '%v': expected %+v, got %+v", c.x, c.result, result)
|
t.Errorf("Failed equality test for '%v': expected %+v, got %+v", c.x, c.result, result)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,9 +199,9 @@ func TestTimeEqual(t *testing.T) {
|
|||||||
func TestTimeBefore(t *testing.T) {
|
func TestTimeBefore(t *testing.T) {
|
||||||
t1 := NewTime(time.Now())
|
t1 := NewTime(time.Now())
|
||||||
cases := []struct {
|
cases := []struct {
|
||||||
name string
|
name string
|
||||||
x *Time
|
x *Time
|
||||||
y *Time
|
y *Time
|
||||||
}{
|
}{
|
||||||
{"nil <? nil", nil, nil},
|
{"nil <? nil", nil, nil},
|
||||||
{"!nil <? !nil", &t1, &t1},
|
{"!nil <? !nil", &t1, &t1},
|
||||||
@@ -233,7 +233,7 @@ func TestTimeIsZero(t *testing.T) {
|
|||||||
for _, c := range cases {
|
for _, c := range cases {
|
||||||
t.Run(c.name, func(t *testing.T) {
|
t.Run(c.name, func(t *testing.T) {
|
||||||
result := c.x.IsZero()
|
result := c.x.IsZero()
|
||||||
if result != c.result{
|
if result != c.result {
|
||||||
t.Errorf("Failed equality test for '%v': expected %+v, got %+v", c.x, c.result, result)
|
t.Errorf("Failed equality test for '%v': expected %+v, got %+v", c.x, c.result, result)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user