NilMapsAreEmpty should allow to make a nil map to be equal to an empty map.
Add corresponding test. All logic is the same as for NilSlicesAreEmpty.
Additionally fix printing map keys in diffs. Using %s with non string/Stringer keys
leads to messages like map[%!s(int=1)]. Change it to %v which also respects
Stringer but also prints other types nicely.
Coverage remained the same at 100.0% when pulling f00ceba14562f55f1110b44cac3a3a3fb2989172 on yalegko:master into 3c58d730f064836fd875a220cfefdef7b2b8075a on go-test:master.
Coverage remained the same at 100.0% when pulling f00ceba14562f55f1110b44cac3a3a3fb2989172 on yalegko:master into 3c58d730f064836fd875a220cfefdef7b2b8075a on go-test:master.
NilMapsAreEmpty should allow to make a nil map to be equal to an empty map. Add corresponding test. All logic is the same as for NilSlicesAreEmpty.
Additionally fix printing map keys in diffs. Using
%s
with non string/Stringer keys leads to messages likemap[%!s(int=1)]
. Change it to%v
which also respects Stringer but also prints other types nicely.