testequal: add tests that compare map with slice to forbid using short form of type assertion in solution
This commit is contained in:
parent
febc967100
commit
4304387383
1 changed files with 2 additions and 0 deletions
|
@ -67,12 +67,14 @@ func TestNotEqual(t *testing.T) {
|
||||||
{expected: []int{1, 2, 3, 4}, actual: []int{1, 2, 3}},
|
{expected: []int{1, 2, 3, 4}, actual: []int{1, 2, 3}},
|
||||||
{expected: []int{}, actual: []interface{}{}},
|
{expected: []int{}, actual: []interface{}{}},
|
||||||
{expected: []int{}, actual: *new([]int)},
|
{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{}},
|
||||||
{expected: map[string]string{"a": "b"}, actual: map[string]string{"a": "d"}},
|
{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"}, 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", "c": "b"}, actual: map[string]string{"a": "b"}},
|
||||||
{expected: map[string]string{"a": "b"}, actual: map[string]interface{}{"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[string]string{}, actual: *new(map[string]string)},
|
||||||
|
{expected: map[int]int{}, actual: []int{}},
|
||||||
{expected: []byte{}, actual: *new([]byte)},
|
{expected: []byte{}, actual: *new([]byte)},
|
||||||
{expected: []byte{}, actual: nil},
|
{expected: []byte{}, actual: nil},
|
||||||
{expected: *new([]byte), actual: nil},
|
{expected: *new([]byte), actual: nil},
|
||||||
|
|
Loading…
Reference in a new issue