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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
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