franela/goblin

0 not equal 0x0

askovpen opened this issue · 1 comments

fail:
g.Assert(bufHash32("")).Equal(0x0)

pass:
g.Assert(bufHash32("")).Equal(uint32(0x0))

plz add ability to use "0x%x" format. and view result in same format.

I think it is not a problem of 0x%x notation, but rather that 0x0 is of type int and uint32(0x0) of type uint32.
Two objects with the same value but not the same type are different. It works the same way as 0 != nil.