<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Catch2 on PlumePHP</title><link>https://plumephp.com/tags/catch2/</link><description>Recent content in Catch2 on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Wed, 30 Sep 2026 17:00:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/catch2/index.xml" rel="self" type="application/rss+xml"/><item><title>C++ 单元测试框架：Google Test、Catch2、Doctest 与 Mock 技巧</title><link>https://plumephp.com/cpp-testing-gtest-catch2/</link><pubDate>Wed, 30 Sep 2026 17:00:00 +0800</pubDate><guid>https://plumephp.com/cpp-testing-gtest-catch2/</guid><description>&lt;p&gt;C++ 缺乏内置的单元测试支持，但社区已经发展出多个成熟、功能丰富且各具特色的测试框架。Google Test 凭借其庞大的生态和 Google Mock 的集成，成为企业级项目的默认选择；Catch2 以单头文件、BDD 风格和自然语言断言著称；Doctest 则追求极致轻量和编译速度。本文将系统对比这三种框架的核心能力，并深入讲解 Mock 技巧和测试覆盖率集成——这是 https://plumephp.com/cpp-engineering-practices/ 中提到的代码质量保障核心环节。&lt;/p&gt;</description></item></channel></rss>