# Kevin CTest **Repository Path**: PhoenixWing321/kevin_ctest ## Basic Information - **Project Name**: Kevin CTest - **Description**: Ctest Study - catch2 - boost - **Primary Language**: C++ - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 5 - **Created**: 2024-06-07 - **Last Updated**: 2025-05-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # kevin_CTest CTest 单元测试学习 ## CTest 学习Catch2 框架 - 单个文档的测试架构,使用方便, - 据说 使用率排第二 - [catch2:一个好用的C++单元测试框架](https://blog.csdn.net/ithiker/article/details/87909651) https://www.bilibili.com/video/BV1pz4y1i7Lm ## GoogleTest - 学习Google Test框架 - 据说 使用率排第一 ### 使用说明 #### google test sample 参考: - [CMake C++开发 windows 下 googletest 模板项目教程搭建](https://blog.csdn.net/jxusthusiwen/article/details/137971944) - [GoogleTest使用教程](https://blog.csdn.net/zzy979481894/article/details/127177663) #### 编译和运行测试 在项目的根目录下创建一个构建目录,配置项目,构建项目并运行测试: ``` mkdir build cd build cmake .. make -j20 ./tests/runTests ``` #### 解决错误: - gtest.lib(gtest-all.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值 参考: https://blog.csdn.net/l1216766050/article/details/128571511 ``` set(CMAKE_CXX_FLAGS_DEBUG "/MTd") ``` ## spdlog - 学习spdlog 框架 - [spdlog: C++的日志库](https://blog.csdn.net/gls_nuaa/article/details/126738472) # 子模块 ## 3rdParty/googletest - github url: https://github.com/google/googletest.git - gitee fork: https://gitee.com/bigearrabbit/googletest.git ## 3rdParty/spdlog - github url: https://github.com/gabime/spdlog - gitee fork: https://gitee.com/bigearrabbit/spdlog.git ## 3rdParty/nlohmann_json Json for Modern C++ - url = https://github.com/nlohmann/json.git - https://gitee.com/bigearrabbit/nlohmann_json.git ## 3rdParty/toml11 - GitHub: https://github.com/ToruNiina/toml11 - gitee: https://gitee.com/PhoenixWing321/toml11.git - 特点: - 仅头文件实现,C++11 - 性能好 - 错误信息清晰 - 支持最新TOML v1.0.0规范 - 使用简单,API友好 ## 3rdParty/toml11/single_include - 单个头文件引用s