Fix object-to-pointer comparisons on Leopard
authorWincent Colaiuta <win@wincent.com>
Mon, 23 Jul 2007 19:42:09 +0000 (21:42 +0200)
committerWincent Colaiuta <win@wincent.com>
Mon, 23 Jul 2007 19:42:09 +0000 (21:42 +0200)
commita39fc79acad6c803724a606d54e17a24d2c984ff
treea7a9e6e5757bfb208b31daba34cc5cc64ad76bcc
parent4cdc88df8baa21f961da644c0bf87861a686d7a3
Fix object-to-pointer comparisons on Leopard

The behaviour of the @encode directive has changed on Leopard and this breaks
a number of the comparisons that previously worked in Tiger. For example,
comparisons between object pointers and nil, or even between nil and nil,
were broken.

This commit adds some special cases for these types of comparisons which
now perform simple pointer equality tests instead of failing. I also removed
one test which failed on Tiger (when nil was encoded as a numeric scalar) but
no longer fails on Leopard.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
NSValue+WOTest.m
Tests/WOTestSelfTests.m