A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch). 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. You are on the devel branch, where the v3 version is being developed. 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.

Features

  • Catch2's main advantage is that using it is both simple and natural
  • Catch2 is mainly a unit testing framework for C++
  • Provides basic micro-benchmarking features, and simple BDD macros
  • C++ boolean expressions
  • Sections provide a nice and local way to share set-up and tear-down code in tests
  • Test names do not have to be valid identifiers

Project Samples

Project Activity

See All Activity >

License

Boost Software License (BSL1.0)

Follow Catch2

Catch2 Web Site

Other Useful Business Software
Ship AI Apps Faster with Vertex AI Icon
Ship AI Apps Faster with Vertex AI

Go from idea to deployed AI app without managing infrastructure. Vertex AI offers one platform for the entire AI development lifecycle.

Ship AI apps and features faster with Vertex AI—your end-to-end AI platform. Access Gemini 3 and 200+ foundation models, fine-tune for your needs, and deploy with enterprise-grade MLOps. Build chatbots, agents, or custom models. New customers get $300 in free credit.
Try Vertex AI Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Catch2!

Additional Project Details

Programming Language

C++

Related Categories

C++ Frameworks, C++ Unit Testing Tool, C++ Test Frameworks

Registered

2022-11-16