使用Xcode 4配置googletest的正确方法是什么? [英] What is the proper way to configure googletest with Xcode 4?

查看:220
本文介绍了使用Xcode 4配置googletest的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照 http://code.google.com/p中的说明操作/ googletest / wiki / XcodeGuide 来设置googletest以使用Xcode。但是,这些指令似乎是为Xcode 3编写的。本文提到的很多东西在Xcode 4中已经改变了。使用Xcode 4来测试google测试的正确方法是什么?

I am following the instructions located at http://code.google.com/p/googletest/wiki/XcodeGuide to set up googletest to work with Xcode. However, these instructions seem to be written for Xcode 3. Many things that this article mentions have changed in Xcode 4. What is the proper way to get google test to work with Xcode 4?

推荐答案


  1. 按照 http://code.google.com/p/googletest/wiki/XcodeGuide 构建gtest.framework包。

  2. 创建新命令行工具目标。

  3. 将googletest框架中的main.cpp文件的内容复制到您的目标的新main.cpp文件中。


  1. Follow the instructions located at http://code.google.com/p/googletest/wiki/XcodeGuide to build the gtest.framework package.
  2. Create a new command line tool target.
  3. Copy the contents of the main.cpp file in the googletest framework into your new main.cpp file for your target. Your main function will kick off the google test.
  4. Execute the new target when you want to run your unit tests.

这篇关于使用Xcode 4配置googletest的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆