Frage

I am doing an Max OS X terminal project. After I am done with the implementation I wanted to try try unit test. So I created a test target and set the target to be the one that I want to test. I wrote some simple test cases but it tells the link error ""_OBJC_CLASS_$_SomeClassUnderTest", referenced from: objc-class-ref in SomeTest.o" I looked at link

so first of all, why the error happened? I mean apple's official document does not mention anything about bundle loader or whatsoever, why I have to do that? there is something wrong with my original config or something? the linking should go the executable file? or it should go to static library file? but where to find that for testing and how to reference that?

and now the issue about linking issue is gone. but I got test fail even if I do "XCTAssertTrue(1==1,"")"! and I do not see any issue generated saying tests not pass or pass, just after build succeed there is a message saying test failed? why is this so?

War es hilfreich?

Lösung

This is a bug in Xcode and is corrected in version 5.1 . When using the simulator, tests can sometimes show the message Test target [test name] encountered an error (Test process exited with code -1)

See Xcode release notes for official details: enter link description here

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top