{"id":230,"date":"2009-12-16T18:29:10","date_gmt":"2009-12-16T17:29:10","guid":{"rendered":"http:\/\/www.paullynch.org\/blog\/?p=230"},"modified":"2009-12-16T18:29:10","modified_gmt":"2009-12-16T17:29:10","slug":"objective-c-unit-tests","status":"publish","type":"post","link":"http:\/\/www.paullynch.org\/blog\/?p=230","title":{"rendered":"Objective C Unit Tests"},"content":{"rendered":"<p>A few notes here: I don&#8217;t use Unit Tests as much as I should (probably true of most of us, I guess). \u00c2\u00a0I had built a good, functioning example for a Cocoa class a year or two back, and wanted to make use of that in a new project.<\/p>\n<p>There&#8217;s a reasonable guide on the ADC site, at <a href=\"http:\/\/devworld.apple.com\/mac\/articles\/tools\/unittestingwithxcode3.html\">ADC\u00e2\u20ac\u201dAutomated Unit Testing with Xcode 3 and Objective-C<\/a>. \u00c2\u00a0There&#8217;s also a lot of out dated guides, which sort of get in the way.<\/p>\n<p>I hit a problem with my build: <code>\"&lt;SenTestingKit\/SenTestingKit.h&gt; no such file\"<\/code>. \u00c2\u00a0After a certain amount of thrashing around, finding several mailing list posts from people with the same problem, and no help from careful reading of the ADC guide, I found the solution: make sure that your test classes are in the Unit Tests target, and not the main project target (look at the check boxes under each target).<\/p>\n<p>Another useful link is: <a href=\"http:\/\/chanson.livejournal.com\/182472.html\" target=\"_blank\">Chris Hanson&#8217;s Xcode unit testing articles updated<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few notes here: I don&#8217;t use Unit Tests as much as I should (probably true of most of us, I guess). \u00c2\u00a0I had built a good, functioning example for a Cocoa class a year or two back, and wanted to make use of that in a new project. There&#8217;s a reasonable guide on the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[12,36],"class_list":["post-230","post","type-post","status-publish","format-standard","hentry","category-programming-for-apples","tag-cocoa","tag-unit-tests"],"_links":{"self":[{"href":"http:\/\/www.paullynch.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.paullynch.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.paullynch.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.paullynch.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.paullynch.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=230"}],"version-history":[{"count":0,"href":"http:\/\/www.paullynch.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.paullynch.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.paullynch.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.paullynch.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}