Hi,
I have the following test in my unit test suite:
STAssertEquals(0, [[newUnit itemsWithinBasketFrom:[NSDate dateYesterday] through:[NSDate dateTomorrow]] count],
@"A unit with no items should return 0 when asked for items in place within a date range. (count=%i)",
[[newUnit itemsWithinBasketFrom:[NSDate dateYesterday] through:[NSDate dateTomorrow]] count]);
And the output from the build console is: Type mismatch -- A unit with no items should return nil when asked for items in basket within a date range. (count=0)
.
If count is 0, and I'm testing its equality against 0, then why do I get a type mismatch?
Thanks!