I am using a Mac and would like to create a simple objective c unit test file to try out with a continuous build process. What is the simplest unit test file that I can create that I can point xcodebuild at to execute from the terminal?
//Simple file
//with some setup and a simple assert equal statement
> xcodebuild ...
A simple OCUnit test file might look like this (in a SimpleTests.m file)
I’ve no idea if it is the simplest (and don’t really want to know, thanks). It’s certainly simple enough.
However, to get it to do anything you must build it into a framework that links against SenTestingKit and Foundation frameworks – so having your simple test file isn’t really half the problem.
This might help
http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html
If you go with xCodeBuild you obviously need a complete XCode project, properly setup, inorder to build the framework. You could not really describe this as a simple, single file solution that you can build and execute.