套件:libcatch2-dev(3.7.1-0.4)
C Automated Test Cases in Headers
Catch2 is mainly a unit testing framework for C , but it also provides basic micro-benchmarking features, and simple BDD macros.
Catch2's main advantage is that using it is both simple and natural. Test names do not have to be valid identifiers, assertions look like normal C boolean expressions, and sections provide a nice and local way to share set-up and tear-down code in tests.
If you've been using Catch2 v2, please see the migrate-v2-to-v3.md file in the package documentation. v3 brings a bunch of significant changes, the big one being that Catch2 is no longer a single-header library. Catch2 now behaves as a normal library, with multiple headers and separately compiled implementation.