gtest安装使用教程

安装Gtest

  • 下载源码(https://github.com/google/googletest)
  • 解压源码进入
  • 进入googletest, 创建目录bld, 进入bld, cmake .., make
  • cp googletest/include/gtest /usr/local/include -r
  • cp googletest/bld/libgtest.a /usr/local/lib
  • 进入googlemock, 创建目录bld, 进入bld, cmake .., make
  • cp googlemock/include/gmock /usr/local/include -r
  • cp googlemock/bld/libgmock.a /usr/local/lib

GTest学习文章:
http://www.cnblogs.com/coderzh/archive/2009/04/06/1426755.html

GMock三篇学习文章:
1,http://code.google.com/p/googlemock/wiki/ForDummies
2,http://code.google.com/p/googlemock/wiki/CheatSheet
3,http://code.google.com/p/googlemock/wiki/CookBook

你可能感兴趣的:(gtest安装使用教程)