mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 13:05:20 +01:00
update tests for github ci
This commit is contained in:
parent
4f7cf73002
commit
e49ccede35
@ -1,3 +1,3 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
url = https://github.com/onqtam/doctest
|
url = https://github.com/onqtam/doctest
|
||||||
revision = master
|
revision = 2.4.4
|
||||||
|
@ -31,6 +31,6 @@ enable_testing()
|
|||||||
foreach(name IN ITEMS test_parser test_converter test_extractions)
|
foreach(name IN ITEMS test_parser test_converter test_extractions)
|
||||||
add_executable("${name}" "${name}.cpp")
|
add_executable("${name}" "${name}.cpp")
|
||||||
target_link_libraries("${name}" PRIVATE ssp::ssp doctest::doctest)
|
target_link_libraries("${name}" PRIVATE ssp::ssp doctest::doctest)
|
||||||
target_compile_definitions("${name}" PRIVATE DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN)
|
target_compile_definitions("${name}" PRIVATE CMAKE_GITHUB_CI)
|
||||||
doctest_discover_tests("${name}")
|
doctest_discover_tests("${name}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <doctest.h>
|
|
||||||
#include <ss/converter.hpp>
|
#include <ss/converter.hpp>
|
||||||
|
|
||||||
|
#ifdef CMAKE_GITHUB_CI
|
||||||
|
#include <doctest/doctest.h>
|
||||||
|
#else
|
||||||
|
#include <doctest.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
TEST_CASE("testing split") {
|
TEST_CASE("testing split") {
|
||||||
ss::converter c;
|
ss::converter c;
|
||||||
|
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
#include <ss/extract.hpp>
|
#include <ss/extract.hpp>
|
||||||
#include <doctest.h>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#ifdef CMAKE_GITHUB_CI
|
||||||
|
#include <doctest/doctest.h>
|
||||||
|
#else
|
||||||
|
#include <doctest.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
constexpr auto eps = 0.000001;
|
constexpr auto eps = 0.000001;
|
||||||
using ld = long double;
|
using ld = long double;
|
||||||
|
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <doctest.h>
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <ss/parser.hpp>
|
#include <ss/parser.hpp>
|
||||||
|
|
||||||
|
#ifdef CMAKE_GITHUB_CI
|
||||||
|
#include <doctest/doctest.h>
|
||||||
|
#else
|
||||||
|
#include <doctest.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
struct unique_file_name {
|
struct unique_file_name {
|
||||||
const std::string name;
|
const std::string name;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user