Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>From the log messages given, I assume you are trying to setup a "logic test" (awkward, isn't it?). Your problem is that you try linking to your to-be-tested code when it needs to be included in the testbundle instead. Here's the relevant section of the <a href="http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html#//apple_ref/doc/uid/TP40007959-CH20-SW1" rel="nofollow noreferrer">manual</a> (emphasis mine).</p> <blockquote> <p>For a test case to access the subject API, you may have to <strong>add the appropriate implementation files</strong> to the unit-test bundle and import the corresponding header files into your unit-test class. For an example of a project that uses unit tests, see the <a href="http://developer.apple.com/iphone/library/samplecode/iPhoneUnitTests/index.html#//apple_ref/doc/uid/DTS40008868" rel="nofollow noreferrer">iPhoneUnitTests</a> sample-code project.</p> </blockquote> <p>I have found unit testing setup with OCUnit to be a suboptimal experience too. Unit testing simply isn't a first class practice in the Obj-C world, at least from what is provided by Apple. OCTest is a customized version of the SenTestingKit. Basically it creates a library with the extension .octest that the OCTest runner (otest) executes. Dynamic linking isn't supported (better phrased: allowed) on the iPhone, so that's why you are left of running your tests on your mac only. </p> <p>That's the simple case of "logic tests", "application tests" are a little more complex. The way OCUnit works causes all sorts of pain, especially with debugging. That's why me and many others opted out of OCTest and choose GTM or GHUnit. They work via static linking and including the test-runner in the test-target itself. (Somewhat similar to "application tests".)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload