When you have already got the gtest framework to compile its actually not that hard anymore.
Write your testcases using the macros as described here: https://github.com/google/googletest/blob/master/docs/primer.md#simple-tests
And then to run all your tests:
#include "gtest/gtest.h"
int main(int argc, const char * argv[])
{
testing::InitGoogleTest(&argc, (char**)argv);
return RUN_ALL_TESTS();
}
I've created a seperate build-target for Unit tests where this is the actual main.cpp This works for me using the current Xcode version (4.6.3)