test the charge function in cocos2dx