go-test / deep

Golang deep variable equality test that returns human-readable differences
MIT License
743 stars 54 forks source link

Arrays are not properly compared #12

Closed samlitowitz closed 6 years ago

samlitowitz commented 6 years ago

Arrays content is not compared, for instance deep.Equal([3]int{1, 2, 3}, [3]int{}) == nil is true.

daniel-nichter commented 6 years ago

Thanks for reporting. I'm surprised there's not a test case for that already. Want to write one that reproduces the issue?

samlitowitz commented 6 years ago

It is part of PR #13, located here.

daniel-nichter commented 6 years ago

Awesome, thanks! I see now: I was thinking "slice", for which there are tests, but this is about arrays. Thanks for the fix! I'll tag and release v1.0.1.

pcasaretto commented 6 years ago

Just got bit by this :) Waiting for the release.

daniel-nichter commented 6 years ago

v1.0.1 tagged/released