QTcreater使用google test

1.QTCreater的Pro文件

这里主要是是里面的一些声明,比如头文件路径
INCLUDEPATH:(这里类似于keil中的每加一个头文件的文件夹就要添加一路径)

这样的目的是为了在工程运行代码过程中能够自动的在这些路径中找到。

2.Goole test 入门

  1. 首先认识下google test
    可以查看github中的描述:https://gitee.com/mirrors/googletest/#https://google.github.io/googletest/primer.html
    用QTcreater使用gooletest中可以参考:
    https://blog.csdn.net/u010750137/article/details/104710846
  2. 这里记录两点
    google test中的TEST案例中的命名规则
TEST(TestSuiteName, TestName){
	testbody
}

这里test suite 和test case的区别,test suite是指测试的一个函数或者 类,test case是对于函数或者类的给参数不同值所做的测试,命名可以是描述测试的什么功能或者目的
命名中不能出现下划线 “_”
一个test suite,可以有多个test case,不同的test suite可以有相同的test case 的命名。
image

3.Gerrit的使用

参考别人的:
http://lipeng1667.github.io/2017/01/18/gerrit-guide/

git clone https://github.com/PyMesh/PyMesh.git
cd PyMesh
git submodule update --init

git submodule update --init //这里是下载工程里面的子工程

4. 交叉编译

  1. 交叉编译的解释:
    https://blog.csdn.net/pengfei240/article/details/52912833
  2. make和makefile文件
    https://blog.csdn.net/weixin_38391755/article/details/80380786/
posted on 2021-10-18 15:02  hanmoly  阅读(278)  评论(0)    收藏  举报