diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c0ec29fa..a2ff09541 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,7 +86,7 @@ add_subdirectory(src)
include(CTest)
if(BUILD_TESTING)
list(APPEND CMAKE_MODULE_PATH
- "${Catch2_SOURCE_DIR}/contrib")
+ "${Catch2_SOURCE_DIR}/extras")
include(Catch)
add_subdirectory(tests)
diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt
index ad7473f67..9aa3bb5f8 100644
--- a/dep/CMakeLists.txt
+++ b/dep/CMakeLists.txt
@@ -48,7 +48,7 @@ if(BUILD_TESTING)
include(FetchContent)
FetchContent_Declare(Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
- GIT_TAG v2.13.9
+ GIT_TAG v3.15.2
GIT_SHALLOW 1)
FetchContent_MakeAvailable(Catch2)
endif()
diff --git a/dep/PackageList.txt b/dep/PackageList.txt
index cb7fcd144..d639b6623 100644
--- a/dep/PackageList.txt
+++ b/dep/PackageList.txt
@@ -55,7 +55,7 @@ argon2
catch2
https://github.com/catchorg/Catch2
- Version: v2.13.0
+ Version: v3.15.2
CascLib (An open-source implementation of library for reading CASC storage from Blizzard games since 2014)
https://github.com/ladislav-zezula/CascLib
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 7f706657a..b86c2a078 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -20,7 +20,7 @@ target_link_libraries(tests
PRIVATE
trinity-core-interface
game
- Catch2::Catch2)
+ Catch2::Catch2WithMain)
# Link playerbot module if enabled (for Phase5 tests)
if(BUILD_PLAYERBOT)
diff --git a/tests/common/UniqueTrackablePtr.cpp b/tests/common/UniqueTrackablePtr.cpp
index 12d1188a9..b6ac6213c 100644
--- a/tests/common/UniqueTrackablePtr.cpp
+++ b/tests/common/UniqueTrackablePtr.cpp
@@ -106,9 +106,9 @@ TEST_CASE("Trinity::unique_weak_ptr", "[UniqueTrackablePtr]")
}
// disable warning about invalid reinterpret_cast, test intentionally tests this
-#ifdef __clang__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wreinterpret-base-class"
+#if TRINITY_COMPILER_IS_CLANG
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wreinterpret-base-class"
#endif
TEST_CASE("Trinity::unique_strong_ref_ptr type casts", "[UniqueTrackablePtr]")
@@ -160,6 +160,6 @@ TEST_CASE("Trinity::unique_strong_ref_ptr type casts", "[UniqueTrackablePtr]")
}
}
-#ifdef __clang__
-#pragma GCC diagnostic pop
+#if TRINITY_COMPILER_IS_CLANG
+#pragma clang diagnostic pop
#endif
diff --git a/tests/main.cpp b/tests/main.cpp
deleted file mode 100644
index 8ed9dd586..000000000
--- a/tests/main.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-
-#define CATCH_CONFIG_MAIN
-#include "catch2/catch.hpp"
diff --git a/tests/tc_catch2.h b/tests/tc_catch2.h
index 96fcdaf8c..22e01d62d 100644
--- a/tests/tc_catch2.h
+++ b/tests/tc_catch2.h
@@ -39,6 +39,6 @@ inline std::ostream& operator<<(std::ostream& os, std::nullopt_t)
return os;
}
-#include "catch2/catch.hpp"
+#include
#endif