From ed4976c764638c2061fa1e952539ecaf75ea97f8 Mon Sep 17 00:00:00 2001 From: Boyan Date: Mon, 27 Jul 2020 22:28:46 +1000 Subject: [PATCH] Revert "Fix PR comments" This reverts commit 1ebd9c5791a7b34abb2f0bece9dcdec96b9f5584. --- assert/assertions.go | 10 ---------- assert/assertions_test.go | 15 --------------- 2 files changed, 25 deletions(-) diff --git a/assert/assertions.go b/assert/assertions.go index 94fb18c..6c629e8 100644 --- a/assert/assertions.go +++ b/assert/assertions.go @@ -60,16 +60,6 @@ func ObjectsAreEqual(expected, actual interface{}) bool { return expected == actual } - tExp, ok := expected.(time.Time) - if ok { - - tAct, ok := actual.(time.Time) - if ok { - return tExp.Equal(tAct) - } - return false - } - exp, ok := expected.([]byte) if !ok { return reflect.DeepEqual(expected, actual) diff --git a/assert/assertions_test.go b/assert/assertions_test.go index 5755f1a..f32362b 100644 --- a/assert/assertions_test.go +++ b/assert/assertions_test.go @@ -148,21 +148,6 @@ func TestObjectsAreEqual(t *testing.T) { } -func TestObjectsAreEqual_SerializedTime(t *testing.T) { - t0 := time.Now().Round(0) - b, err := json.Marshal(t0) - if err != nil { - t.Fail() - } - var t1 time.Time - if err := json.Unmarshal(b, &t1); err != nil { - t.Fail() - } - if !ObjectsAreEqual(t0, t1) { - t.Errorf("time must be equals") - } -} - func TestImplements(t *testing.T) { mockT := new(testing.T)