test: restore compatibility with older Catch2 releases

This commit is contained in:
Aleksei Bavshin 2024-02-19 16:49:27 -08:00
parent d59d6e8765
commit 5d6acfd1d4
No known key found for this signature in database
GPG Key ID: 4F071603387A382A
4 changed files with 4 additions and 5 deletions

View File

@ -558,7 +558,6 @@ endif
catch2 = dependency(
'catch2',
version: '>=3.5.1',
default_options: [ 'tests=false' ],
fallback: ['catch2', 'catch2_dep'],
required: get_option('tests'),

View File

@ -4,7 +4,6 @@
#if __has_include(<catch2/catch_test_macros.hpp>)
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_all.hpp>
#else
#include <catch2/catch.hpp>
#endif

View File

@ -7,7 +7,7 @@
#if __has_include(<catch2/catch_test_macros.hpp>)
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_all.hpp>
#include <catch2/matchers/catch_matchers_string.hpp>
#else
#include <catch2/catch.hpp>
#endif

View File

@ -3,8 +3,9 @@
#include <spdlog/sinks/stdout_sinks.h>
#include <spdlog/spdlog.h>
#if __has_include(<catch2/catch_all.hpp>)
#include <catch2/catch_all.hpp>
#if __has_include(<catch2/catch_session.hpp>)
#include <catch2/catch_session.hpp>
#include <catch2/catch_version_macros.hpp>
#include <catch2/reporters/catch_reporter_tap.hpp>
#else
#include <catch2/catch.hpp>