mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
fixup for nil expression
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@34679 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2ba8fc4707
commit
4277a1a0e5
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-01-31 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* TestFramework/Testing.h: Improve handling of equality testing report
|
||||
when expression evaluates to nil.
|
||||
|
||||
2011-11-21 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* target.make: Don't use -undefined dynamic_lookup when linking
|
||||
|
|
|
@ -203,7 +203,7 @@ static void testStart()
|
|||
testStart(); \
|
||||
_obj = (id)(testExpression__);\
|
||||
_exp = (id)(testExpect__);\
|
||||
_cond = _obj == _exp || [_obj isEqual: _exp]; \
|
||||
_cond = _obj == _exp || [_exp isEqual: _obj]; \
|
||||
[[NSGarbageCollector defaultCollector] collectExhaustively]; \
|
||||
pass(_cond, "%s:%d ... " testFormat__, __FILE__, __LINE__, ## __VA_ARGS__); \
|
||||
if (0 == _cond) \
|
||||
|
@ -216,6 +216,11 @@ static void testStart()
|
|||
[[_exp description] UTF8String], [s UTF8String], \
|
||||
[s characterAtIndex: 0]); \
|
||||
} \
|
||||
else if (nil == s) \
|
||||
{ \
|
||||
fprintf(stderr, "Expected '%s' and got (nil)\n", \
|
||||
[[_exp description] UTF8String]); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
fprintf(stderr, "Expected '%s' and got '%s'\n", \
|
||||
|
|
Loading…
Reference in a new issue