Unit Tests

Hey,
I couldn’t find enough information on this but I’d like to use Unit Test in my project.
I tried googletest for c++ testing but couldn’t quite get it to work.
Any tips or ideas? Wouldn’t mind using a different framework either….

I added a simple getBool(int a ) function to my HelloWorld class.
It simply returns a true no matter what parameter you pass to it…

In my test class I have:

#include 
#include "HelloWorldScene.h"
#include "gtest/gtest.h"

TEST(MyTest, Negative) {
    EXPECT_TRUE(getBool(3));
}

According to Xcode getBool is an undeclared identifier
Can someone please help me?
Thanks in advance.

I’d like to know how to properly test cocos2d-x based applications. As I can see from cocos2d-x code is very tightly coupled with real device, so running it standalone is not very simple. Maybe I’m wrong.

I used CppUnitLite several years ago. In my memory it’s platform independent. It’s good for testing game logics, network access.
Currently we’re using MonkeyTest to do black-box testing on Android for our games.
But both of them can not check if the graphic rendering is properly, e.g. the cocos2d Z order is correct, the textures haven’t flicker, etc. Manual test is still very important for game development.

I haven’t quite figured out a solution but I got a little closer I think:
http://stackoverflow.com/questions/14710788/unit-testing-with-cocos2d-x-and-xcode/14801461#14801461
I don’t understand why all of a sudden cocos2d.h cannot be resolved though. Any ideas?