Skip to content

Commit

Permalink
chore: update Catch2 to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Jan 8, 2023
1 parent a5e9ded commit ecec471
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ coverage:
ignore:
- "build/**/*"
- "src/tests/**/*"
- "src/*/tests/*"
- "src/*/tests/**/*"
- "src/e2e/**/*"
- "src/gui-qml/**/*"
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[submodule "tests/src/vendor/catch"]
path = src/tests/vendor/catch
url = https://github.com/catchorg/Catch2.git
branch = v2.x
branch = devel
[submodule "lib/vendor/lexbor"]
path = src/lib/vendor/lexbor
url = https://github.com/lexbor/lexbor.git
2 changes: 1 addition & 1 deletion src/cli/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include_directories(${PROJECT_NAME} PUBLIC "." "../../tests/" "../../tests/src/"
# Executable
add_executable(${PROJECT_NAME} ${SOURCES} ${FORMS} ${UTILS_SOURCES} ${SOURCES_TESTS})
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${LIBS} lib)
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${LIBS} lib Catch2::Catch2)

# Pre-compiled header
if(USE_PCH)
Expand Down
2 changes: 1 addition & 1 deletion src/crash-reporter/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include_directories(${PROJECT_NAME} PUBLIC "." "../../lib/src/" "../../tests/" "
# Executable
add_executable(${PROJECT_NAME} ${SOURCES} ${FORMS} ${UTILS_SOURCES} ${SOURCES_TESTS})
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${LIBS} lib)
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${LIBS} lib Catch2::Catch2)

# Pre-compiled header
if(USE_PCH)
Expand Down
2 changes: 1 addition & 1 deletion src/gui/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ include_directories(${PROJECT_NAME} PUBLIC "." "../../tests/" "../../tests/src/"
# Executable
add_executable(${PROJECT_NAME} ${SOURCES} ${FORMS} ${UTILS_SOURCES} ${SOURCES_TESTS})
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${LIBS} lib)
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${LIBS} lib Catch2::Catch2)

# Pre-compiled header
if(USE_PCH)
Expand Down
3 changes: 2 additions & 1 deletion src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ include_directories("src/" "src/common/" "." "../lib/src/" "../lib/vendor/lexbor

add_executable(${PROJECT_NAME} ${SOURCES})
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} lib)
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} lib Catch2::Catch2)

add_subdirectory(languages)
add_subdirectory(vendor/catch)

# Pre-compiled header
if(USE_PCH)
Expand Down
2 changes: 1 addition & 1 deletion src/tests/src/common/catch.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <QString>
#include <QUrl>
#include <string>
#include "vendor/catch/single_include/catch2/catch.hpp"
#include "vendor/catch/src/catch2/catch_all.hpp"


namespace Catch
Expand Down
4 changes: 1 addition & 3 deletions src/tests/src/common/main.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#define CATCH_CONFIG_RUNNER

#ifdef HEADLESS
#include <QCoreApplication>
#else
#include <QApplication>
#endif
#include "functions.h"
#include "vendor/catch/single_include/catch2/catch.hpp"
#include "vendor/catch/src/catch2/catch_all.hpp"


int main(int argc, char* argv[])
Expand Down
2 changes: 1 addition & 1 deletion src/tests/vendor/catch
Submodule catch updated 688 files

0 comments on commit ecec471

Please sign in to comment.