From 430438738346536090577d59959b037e1f14a228 Mon Sep 17 00:00:00 2001 From: Arseny Balobanov Date: Wed, 25 Mar 2020 23:09:19 +0300 Subject: [PATCH] testequal: add tests that compare map with slice to forbid using short form of type assertion in solution --- testequal/assertions_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testequal/assertions_test.go b/testequal/assertions_test.go index 545c906..5e62b55 100644 --- a/testequal/assertions_test.go +++ b/testequal/assertions_test.go @@ -67,12 +67,14 @@ func TestNotEqual(t *testing.T) { {expected: []int{1, 2, 3, 4}, actual: []int{1, 2, 3}}, {expected: []int{}, actual: []interface{}{}}, {expected: []int{}, actual: *new([]int)}, + {expected: []int{}, actual: map[int]int{}}, {expected: map[string]string{"a": "b"}, actual: map[string]string{}}, {expected: map[string]string{"a": "b"}, actual: map[string]string{"a": "d"}}, {expected: map[string]string{"a": "b"}, actual: map[string]string{"a": "b", "c": "b"}}, {expected: map[string]string{"a": "b", "c": "b"}, actual: map[string]string{"a": "b"}}, {expected: map[string]string{"a": "b"}, actual: map[string]interface{}{"a": "b"}}, {expected: map[string]string{}, actual: *new(map[string]string)}, + {expected: map[int]int{}, actual: []int{}}, {expected: []byte{}, actual: *new([]byte)}, {expected: []byte{}, actual: nil}, {expected: *new([]byte), actual: nil},