随笔 - 52  文章 - 50  评论 - 1  阅读 - 24839

随笔分类 -  gtest

googletest相关文章
摘要:windows从零搭建googletest测试工程 https://blog.csdn.net/qq_42769920/article/details/121198844基于gtest、mockcpp写C++LLT测试入门级教程 https://blog.csdn.net/qq_43003442/a 阅读全文
posted @ 2022-05-26 10:40 蜀山菜鸟 阅读(47) 评论(0) 推荐(0) 编辑
Gmock简单使用
摘要:参考:https://blog.csdn.net/primeprime/article/details/99677794 #include "gtest.h" #include "gmock.h" #include <string> #include <iostream> using namespa 阅读全文
posted @ 2022-05-25 20:48 蜀山菜鸟 阅读(464) 评论(0) 推荐(0) 编辑
ClionLLT搭建
摘要:1. 准备工作 a.下载googletest源码 gtest源码下载地址: 下载地址:https://github.com/google/googletest git 仓库地址:https://github.com/google/googletest.git b.clion工程准备 2. 目录结构 阅读全文
posted @ 2022-05-25 11:54 蜀山菜鸟 阅读(105) 评论(0) 推荐(0) 编辑
googletest简单搭建
摘要:主函数 #include "gtest/gtest.h" #include "gmock/gmock.h" int main(int argc, char **argv) { testing::InitGoogleMock(&argc, argv); testing::InitGoogleTest( 阅读全文
posted @ 2022-05-24 19:51 蜀山菜鸟 阅读(153) 评论(0) 推荐(0) 编辑
googletest 示例
摘要:googletest测试用例 class TestExample : public testing::Test { public: // 所有用例执行前 执行该函数 static void SetUpTestCase() {} // 所有用例执行结束后,执行该函数 static void TearD 阅读全文
posted @ 2022-05-23 22:14 蜀山菜鸟 阅读(454) 评论(0) 推荐(0) 编辑
googletest Cmake脚本
摘要:主目录CMakeLists.txt cmake_minimum_required(VERSION 3.20) project(CppTest) set(CMAKE_CXX_STANDARD 14) include("D:/platform/gtest.cmake") include("D:/plat 阅读全文
posted @ 2022-05-16 15:26 蜀山菜鸟 阅读(171) 评论(0) 推荐(0) 编辑
Clion 错误信息
摘要:1. 在Clion中用gtest执行单元测试,返回错误 Error running 'testAdd.t0': Cannot run 'testAdd.t0' on '<default> 原因是没有指定单元测试的入口。 解决办法:Run->Edit Configurations -> 设置好指定的t 阅读全文
posted @ 2022-05-08 10:40 蜀山菜鸟 阅读(370) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示