mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 21:53:41 +00:00

Catch2 is a multi-paradigm test framework for C++. It is primarily distributed as a single header file, very easy and simple to adopt this to thorvg project. This patch introduces catch2 infrastsructure and one prototype as a sample. You can refer "testInitializer.cpp", how to add unit test! while ignoring else files such as "catch2.hpp", "testMain.cpp" Also, enable Unit-tests with meson option when you change any thorvg code. $meson build -Dtests=true. launch tvgUnitTest in the build result then verify 100% coverage before submitting any patches.
5 lines
208 B
C++
5 lines
208 B
C++
// The only purpose of this file is to DEFINE the catch config so it can include main()
|
|
|
|
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
|
|
|
|
#include "catch.hpp"
|