![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
GTest
鱼啊鱼啊鱼啊
这个作者很懒,什么都没留下…
展开
-
GTest覆盖率demo
1. Ubuntu安装lcovsudo apt install lcov使用lcov -v即可查看LCOV版本2.以hello.c为例#include<stdio.h>int main(int argc,char* argv[]){ if(argc>1) printf("AAAA\n"); else printf("BBB\n"); return 0;}执行gcc -fprofile-arcs -fte原创 2021-09-27 21:24:57 · 379 阅读 · 0 评论 -
GTest入门demo
1.源码文件如下arithmetic.c#include "arithmetic.h"int add(int a, int b) { return a + b;}int sub(int a, int b) { return a - b;}arithmetic.h#ifndef ARITHMETIC_H#define ARITHMETIC_Hextern int add(int a, int b);extern int sub(int a, i...原创 2021-08-06 17:06:41 · 196 阅读 · 0 评论