-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "migrate from catch2v2 to catch2v3 and implement VisorTest hel…
- Loading branch information
Showing
88 changed files
with
869 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[requires] | ||
catch2/3.4.0 | ||
benchmark/1.8.3 | ||
catch2/2.13.10 | ||
corrade/2020.06 | ||
cpp-httplib/0.14.0 | ||
docopt.cpp/0.6.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Unit | ||
add_executable(unit-tests-visor-dns | ||
main.cpp | ||
test_dns.cpp | ||
) | ||
|
||
target_link_libraries(unit-tests-visor-dns | ||
PRIVATE | ||
${CONAN_LIBS_JSON-SCHEMA-VALIDATOR} | ||
Visor::Lib::Dns) | ||
|
||
add_test(NAME unit-tests-visor-dns | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
COMMAND unit-tests-visor-dns | ||
) | ||
|
||
# Benchmark | ||
add_executable(benchmark-visor-dns | ||
benchmark_dns.cpp | ||
) | ||
|
||
target_link_libraries(benchmark-visor-dns PRIVATE | ||
Visor::Lib::Dns | ||
${CONAN_LIBS_BENCHMARK}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#define CATCH_CONFIG_RUNNER | ||
#include <catch2/catch.hpp> | ||
#include <cstdlib> | ||
#include <spdlog/sinks/stdout_color_sinks.h> | ||
#include <spdlog/spdlog.h> | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
Catch::Session session; | ||
|
||
auto logger = spdlog::get("visor"); | ||
if (!logger) { | ||
spdlog::stderr_color_mt("visor"); | ||
} | ||
|
||
int result = session.applyCommandLine(argc, argv); | ||
if (result != 0) { | ||
return result; | ||
} | ||
|
||
result = session.run(); | ||
|
||
return (result == 0 ? EXIT_SUCCESS : EXIT_FAILURE); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include <catch2/catch_all.hpp> | ||
#include "catch2/catch.hpp" | ||
|
||
#include "dns.h" | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Unit | ||
add_executable(unit-tests-visor-utils | ||
main.cpp | ||
test_utils.cpp | ||
) | ||
|
||
target_link_libraries(unit-tests-visor-utils | ||
PRIVATE | ||
${CONAN_LIBS_JSON-SCHEMA-VALIDATOR} | ||
Visor::Lib::Utils) | ||
|
||
add_test(NAME unit-tests-visor-utils | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
COMMAND unit-tests-visor-utils | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#define CATCH_CONFIG_RUNNER | ||
#include <catch2/catch.hpp> | ||
#include <cstdlib> | ||
#include <spdlog/sinks/stdout_color_sinks.h> | ||
#include <spdlog/spdlog.h> | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
Catch::Session session; | ||
|
||
auto logger = spdlog::get("visor"); | ||
if (!logger) { | ||
spdlog::stderr_color_mt("visor"); | ||
} | ||
|
||
int result = session.applyCommandLine(argc, argv); | ||
if (result != 0) { | ||
return result; | ||
} | ||
|
||
result = session.run(); | ||
|
||
return (result == 0 ? EXIT_SUCCESS : EXIT_FAILURE); | ||
} |
2 changes: 1 addition & 1 deletion
2
libs/visor_utils/test_utils.cpp → libs/visor_utils/tests/test_utils.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include <catch2/catch_test_macros.hpp> | ||
#include "catch2/catch.hpp" | ||
#include "utils.h" | ||
|
||
#ifdef _WIN32 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.