Skip to content

Commit

Permalink
test: restore compatibility with older Catch2 releases
Browse files Browse the repository at this point in the history
  • Loading branch information
alebastr committed Feb 20, 2024
1 parent d59d6e8 commit 5d6acfd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ endif

catch2 = dependency(
'catch2',
version: '>=3.5.1',
default_options: [ 'tests=false' ],
fallback: ['catch2', 'catch2_dep'],
required: get_option('tests'),
Expand Down
1 change: 0 additions & 1 deletion test/css_reload_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 5d6acfd

Please sign in to comment.