lunarmodules / luassert

Assertion library for Lua
MIT License
202 stars 76 forks source link

Deepcompare keys #194

Open RiskoZoSlovenska opened 1 year ago

RiskoZoSlovenska commented 1 year ago

See https://github.com/lunarmodules/luassert/issues/193#issuecomment-1605903228 for context.

This PR makes util.deepcompare attempt to compare keys that are tables instead of just giving up right away, so that

assert.are.same({ [{}] = 1 }, { [{}] = 1 })

passes.

Tieske commented 1 year ago

discussion in #193 , hence locking discussion here