gh-unit

GH-Unit for unit testing Objective-C code, why am I getting linking errors?

你说的曾经没有我的故事 提交于 2019-12-01 18:18:16
I'm trying to dive into the quite frankly terrible world of unit testing using Xcode (such a convoluted process it seems.) Basically I have this test class, attempting to test my Show.h class #import <GHUnit/GHUnit.h> #import "Show.h" @interface ShowTest : GHTestCase { } @end @implementation ShowTest - (void)testShowCreate { Show *s = [[Show alloc] init]; GHAssertNotNil(s,@"Was nil."); } @end However when I try to build and run my tests it moans with this error: - Undefined symbols: "_OBJC_CLASS_$_Show", referenced from: __objc_classrefs__DATA@0 in ShowTest.o ld: symbol(s) not found collect2:

OCUnit testing an embedded framework

一曲冷凌霜 提交于 2019-12-01 03:03:11
问题 UPDATE: I ended up giving up and added GHUnit to my project instead. I got up and running with GHUnit in a matter of minutes. UPDATE: You can download the Xcode project here: http://github.com/d11wtq/Cioccolata I've added a Unit Test target to my Xcode project but it fails to find my framework when it builds, saying: Test.octest could not be loaded because a link error occurred. It is likely that dyld cannot locate a framework framework or library that the the test bundle was linked against,