Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-05-07 16:24:05 +0200
committerMartin Hořeňovský2020-05-09 18:00:49 +0200
commitdb32550898ac0b7bdb81228972f6ba58b88ce18d (patch)
treee00421664132373cc9398aebbaf01c8a9f8b8015 /tests
parente78b4f6be78912bdc812dba0fbf2166841ffb7be (diff)
downloadcatch3-db32550898ac0b7bdb81228972f6ba58b88ce18d.tar.gz
Remove catch_default_main.hpp
There are two reasons for this: 1) It is highly unlikely that someone has use for this header, which has no customization points and only provides simplest possible main, and cannot link the static library which also provides a default main implementation. 2) It being a header was causing extra complications with the convenience headers, and our checking script. This would either require special handling in the checking script, or would break user's of the main convenience header. All in all, it is simpler and better in the long term to remove it, than to fix its problems.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp1
-rw-r--r--tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp1
-rw-r--r--tests/SelfTest/TestRegistrations.cpp (renamed from tests/SelfTest/TestMain.cpp)2
4 files changed, 2 insertions, 6 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index f38ca4b9..8b3c9092 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -15,7 +15,7 @@ endif(MSVC) #Temporary workaround
# define the sources of the self test
# Please keep these ordered alphabetically
set(TEST_SOURCES
- ${SELF_TEST_DIR}/TestMain.cpp
+ ${SELF_TEST_DIR}/TestRegistrations.cpp
${SELF_TEST_DIR}/IntrospectiveTests/CmdLine.tests.cpp
${SELF_TEST_DIR}/IntrospectiveTests/Details.tests.cpp
${SELF_TEST_DIR}/IntrospectiveTests/GeneratorsImpl.tests.cpp
@@ -72,7 +72,7 @@ set(HEADERS
include(CTest)
add_executable(SelfTest ${TEST_SOURCES})
-target_link_libraries(SelfTest PRIVATE Catch2)
+target_link_libraries(SelfTest PRIVATE Catch2WithMain)
if (CATCH_ENABLE_COVERAGE)
set(ENABLE_COVERAGE ON CACHE BOOL "Enable coverage build." FORCE)
diff --git a/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp b/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp
index 5deb30f9..c981fa0b 100644
--- a/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp
+++ b/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp
@@ -1,4 +1,3 @@
-#include <catch2/internal/catch_default_main.hpp>
#include <catch2/catch_test_macros.hpp>
TEST_CASE("Tests that run") {
diff --git a/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp b/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp
index 0870e9ca..ae698165 100644
--- a/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp
+++ b/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp
@@ -1,4 +1,3 @@
-#include <catch2/internal/catch_default_main.hpp>
#include <catch2/catch_test_macros.hpp>
namespace Catch {
diff --git a/tests/SelfTest/TestMain.cpp b/tests/SelfTest/TestRegistrations.cpp
index 88025d3a..dc3625fe 100644
--- a/tests/SelfTest/TestMain.cpp
+++ b/tests/SelfTest/TestRegistrations.cpp
@@ -24,5 +24,3 @@ struct TestListener : Catch::TestEventListenerBase {
#include <catch2/catch_reporter_registrars.hpp>
CATCH_REGISTER_LISTENER( TestListener )
-
-#include <catch2/internal/catch_default_main.hpp>