NSInteger differences between CLI and GUI ?
Posted
by d11wtq
on Stack Overflow
See other posts from Stack Overflow
or by d11wtq
Published on 2010-05-27T03:45:50Z
Indexed on
2010/05/27
3:51 UTC
Read the original article
Hit count: 450
I've been building a framework and writing unit tests in GHUnit. One of my Framework's accessor methods returns an NSInteger.
I assert the expected value in the tests like this:
GHAssertEquals(1320, request.port, @"Port number should be 1320");
When running my tests with an AppKit UI based frontend this assertion passes.
However, when I run my tests on the command line, it fails with a type-mismatch unless I type-cast my hard-coded 1320 as (NSInteger)
. What's causing the difference in the way the integer is being interpreted by the compiler? Is xcodebuild on the command line using a different data-type for hard coded integers?
© Stack Overflow or respective owner