From: Boyuan Yang <byang@debian.org>
Date: Wed, 19 Jun 2024 11:41:38 -0400
Subject: Migrate to catch v3

---
 CMakeLists.txt                         | 4 ++--
 cmake/ParseAndAddCatchTests.cmake      | 2 +-
 tests/blob_example.cc                  | 2 +-
 tests/error_log.cc                     | 2 +-
 tests/exception_dont_execute.cc        | 2 +-
 tests/exception_dont_execute_nested.cc | 2 +-
 tests/exceptions.cc                    | 2 +-
 tests/flags.cc                         | 2 +-
 tests/functions.cc                     | 2 +-
 tests/functors.cc                      | 2 +-
 tests/lvalue_functor.cc                | 2 +-
 tests/mov_ctor.cc                      | 2 +-
 tests/named.cc                         | 2 +-
 tests/nullptr_uniqueptr.cc             | 2 +-
 tests/prepared_statment.cc             | 2 +-
 tests/readme_example.cc                | 2 +-
 tests/shared_connection.cc             | 2 +-
 tests/simple_examples.cc               | 2 +-
 tests/sqlcipher.cc                     | 2 +-
 tests/std_optional.cc                  | 2 +-
 tests/string_view.cc                   | 2 +-
 tests/trycatchblocks.cc                | 2 +-
 tests/variant.cc                       | 2 +-
 23 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5bf7380..4ca6fd8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,9 +29,9 @@ target_include_directories(sqlite_modern_cpp INTERFACE hdr/)
 add_executable(tests_runner ${TEST_SOURCES})
 target_include_directories(tests_runner INTERFACE ${SQLITE3_INCLUDE_DIRS})
 if(ENABLE_SQLCIPHER_TESTS)
-    target_link_libraries(tests_runner Catch2::Catch2 sqlite_modern_cpp SQLite::SQLite3 -lsqlcipher)
+    target_link_libraries(tests_runner Catch2::Catch2WithMain sqlite_modern_cpp SQLite::SQLite3 -lsqlcipher)
 else()
-    target_link_libraries(tests_runner Catch2::Catch2 sqlite_modern_cpp SQLite::SQLite3)
+    target_link_libraries(tests_runner Catch2::Catch2WithMain sqlite_modern_cpp SQLite::SQLite3)
 endif()
 
 catch_discover_tests(tests_runner)
diff --git a/cmake/ParseAndAddCatchTests.cmake b/cmake/ParseAndAddCatchTests.cmake
index cb2846d..aa9cc93 100644
--- a/cmake/ParseAndAddCatchTests.cmake
+++ b/cmake/ParseAndAddCatchTests.cmake
@@ -17,7 +17,7 @@
 #        set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake.modules/")          #
 #        enable_testing()                                                                          #
 #                                                                                                  #
-#        find_path(CATCH_INCLUDE_DIR "catch.hpp")                                                  #
+#        find_path(CATCH_INCLUDE_DIR "catch_all.hpp")                                                  #
 #        include_directories(${INCLUDE_DIRECTORIES} ${CATCH_INCLUDE_DIR})                          #
 #                                                                                                  #
 #        file(GLOB SOURCE_FILES "*.cpp")                                                           #
diff --git a/tests/blob_example.cc b/tests/blob_example.cc
index f019eb5..68cb677 100644
--- a/tests/blob_example.cc
+++ b/tests/blob_example.cc
@@ -2,7 +2,7 @@
 #include <cstdlib>
 #include <vector>
 #include <string>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 #include <sqlite_modern_cpp.h>
 using namespace  sqlite;
 using namespace std;
diff --git a/tests/error_log.cc b/tests/error_log.cc
index 3c5606b..5340193 100644
--- a/tests/error_log.cc
+++ b/tests/error_log.cc
@@ -5,7 +5,7 @@
 #include <stdexcept>
 #include <sqlite_modern_cpp.h>
 #include <sqlite_modern_cpp/log.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace sqlite;
 using namespace std;
 
diff --git a/tests/exception_dont_execute.cc b/tests/exception_dont_execute.cc
index 156ac31..fe1862d 100644
--- a/tests/exception_dont_execute.cc
+++ b/tests/exception_dont_execute.cc
@@ -3,7 +3,7 @@
 #include <memory>
 #include <stdexcept>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace sqlite;
 using namespace std;
 
diff --git a/tests/exception_dont_execute_nested.cc b/tests/exception_dont_execute_nested.cc
index a416829..4b0dd6f 100644
--- a/tests/exception_dont_execute_nested.cc
+++ b/tests/exception_dont_execute_nested.cc
@@ -3,7 +3,7 @@
 #include <memory>
 #include <stdexcept>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace sqlite;
 using namespace std;
 
diff --git a/tests/exceptions.cc b/tests/exceptions.cc
index 5905e04..47205ab 100644
--- a/tests/exceptions.cc
+++ b/tests/exceptions.cc
@@ -4,7 +4,7 @@
 #include <memory>
 #include <stdexcept>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace sqlite;
 using namespace std;
 
diff --git a/tests/flags.cc b/tests/flags.cc
index e1af2b7..903208a 100644
--- a/tests/flags.cc
+++ b/tests/flags.cc
@@ -3,7 +3,7 @@
 #include <cstdlib>
 #include <sqlite_modern_cpp.h>
 #include <sys/types.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace sqlite;
 using namespace std;
 
diff --git a/tests/functions.cc b/tests/functions.cc
index b7a7bad..7bb6671 100644
--- a/tests/functions.cc
+++ b/tests/functions.cc
@@ -2,7 +2,7 @@
 #include <cstdlib>
 #include <cmath>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace  sqlite;
 using namespace std;
 
diff --git a/tests/functors.cc b/tests/functors.cc
index 3c8b502..c7f2670 100644
--- a/tests/functors.cc
+++ b/tests/functors.cc
@@ -3,7 +3,7 @@
 #include <algorithm>
 #include <string>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 
 using namespace sqlite;
 using namespace std;
diff --git a/tests/lvalue_functor.cc b/tests/lvalue_functor.cc
index ba48995..69138f3 100644
--- a/tests/lvalue_functor.cc
+++ b/tests/lvalue_functor.cc
@@ -2,7 +2,7 @@
 #include<sqlite_modern_cpp.h>
 #include<string>
 #include<vector>
-#include<catch2/catch.hpp>
+#include<catch2/catch_all.hpp>
 using namespace  sqlite;
 using namespace std;
 
diff --git a/tests/mov_ctor.cc b/tests/mov_ctor.cc
index 95389b2..7589e25 100644
--- a/tests/mov_ctor.cc
+++ b/tests/mov_ctor.cc
@@ -3,7 +3,7 @@
 #include <cstdlib>
 #include <sqlite_modern_cpp.h>
 #include <memory>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace  sqlite;
 using namespace std;
 
diff --git a/tests/named.cc b/tests/named.cc
index 2b255c4..309b803 100644
--- a/tests/named.cc
+++ b/tests/named.cc
@@ -1,7 +1,7 @@
 #include <iostream>
 #include <cstdlib>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace sqlite;
 using namespace std;
 
diff --git a/tests/nullptr_uniqueptr.cc b/tests/nullptr_uniqueptr.cc
index f485192..3e92791 100644
--- a/tests/nullptr_uniqueptr.cc
+++ b/tests/nullptr_uniqueptr.cc
@@ -2,7 +2,7 @@
 #include <string>
 #include <vector>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace std;
 using namespace sqlite;
 
diff --git a/tests/prepared_statment.cc b/tests/prepared_statment.cc
index b5aa302..b768de6 100644
--- a/tests/prepared_statment.cc
+++ b/tests/prepared_statment.cc
@@ -1,7 +1,7 @@
 #include <iostream>
 #include <cstdlib>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace  sqlite;
 using namespace std;
 
diff --git a/tests/readme_example.cc b/tests/readme_example.cc
index d5137fc..a0ed5df 100644
--- a/tests/readme_example.cc
+++ b/tests/readme_example.cc
@@ -1,6 +1,6 @@
 #define CATCH_CONFIG_MAIN
 #include<iostream>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 #include <sqlite_modern_cpp.h>
 
 using namespace sqlite;
diff --git a/tests/shared_connection.cc b/tests/shared_connection.cc
index 4f27093..004b9c5 100644
--- a/tests/shared_connection.cc
+++ b/tests/shared_connection.cc
@@ -2,7 +2,7 @@
 #include <cstdio>
 #include <cstdlib>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 
 using namespace  sqlite;
 using namespace std;
diff --git a/tests/simple_examples.cc b/tests/simple_examples.cc
index d8e684d..1cb23dc 100644
--- a/tests/simple_examples.cc
+++ b/tests/simple_examples.cc
@@ -2,7 +2,7 @@
 #include <cstdio>
 #include <cstdlib>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace sqlite;
 using namespace std;
 
diff --git a/tests/sqlcipher.cc b/tests/sqlcipher.cc
index 2fc2f10..3c60f84 100644
--- a/tests/sqlcipher.cc
+++ b/tests/sqlcipher.cc
@@ -1,7 +1,7 @@
 #include <iostream>
 #include <cstdio>
 #include <cstdlib>
-#include <catch.hpp>
+#include <catch2/catch_all.hpp>
 
 #include <sqlite_modern_cpp/sqlcipher.h>
 using namespace sqlite;
diff --git a/tests/std_optional.cc b/tests/std_optional.cc
index c4e6c55..3ab1373 100644
--- a/tests/std_optional.cc
+++ b/tests/std_optional.cc
@@ -1,6 +1,6 @@
 #include <iostream>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 
 using namespace sqlite;
 using namespace std;
diff --git a/tests/string_view.cc b/tests/string_view.cc
index 39b13d8..c1b0521 100644
--- a/tests/string_view.cc
+++ b/tests/string_view.cc
@@ -1,5 +1,5 @@
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 
 
 #ifdef MODERN_SQLITE_STRINGVIEW_SUPPORT
diff --git a/tests/trycatchblocks.cc b/tests/trycatchblocks.cc
index 2c0f762..3d7f21a 100644
--- a/tests/trycatchblocks.cc
+++ b/tests/trycatchblocks.cc
@@ -3,7 +3,7 @@
 #include <cstdio>
 #include <cstdlib>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 
 using namespace sqlite;
 using std::string;
diff --git a/tests/variant.cc b/tests/variant.cc
index ae755da..bd833fa 100644
--- a/tests/variant.cc
+++ b/tests/variant.cc
@@ -1,7 +1,7 @@
 #include <iostream>
 #include <cstdlib>
 #include <sqlite_modern_cpp.h>
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 using namespace sqlite;
 using namespace std;
 
