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

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start 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