mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-14 11:40:35 +07:00
add doctest as submodule
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -4,3 +4,6 @@
|
||||
[submodule "vendors/kari.hpp"]
|
||||
path = vendors/kari.hpp
|
||||
url = https://github.com/BlackMATov/kari.hpp
|
||||
[submodule "vendors/doctest"]
|
||||
path = vendors/doctest
|
||||
url = https://github.com/onqtam/doctest
|
||||
|
||||
@@ -32,6 +32,7 @@ if(BUILD_AS_STANDALONE)
|
||||
option(BUILD_WITH_UNTESTS "Build with unit tests" ON)
|
||||
if(BUILD_WITH_UNTESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(vendors/doctest)
|
||||
add_subdirectory(untests)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -18,7 +18,7 @@ endif()
|
||||
|
||||
file(GLOB_RECURSE UNTESTS_SOURCES "*.cpp" "*.hpp")
|
||||
add_executable(${PROJECT_NAME} ${UNTESTS_SOURCES})
|
||||
target_link_libraries(${PROJECT_NAME} meta.hpp)
|
||||
target_link_libraries(${PROJECT_NAME} meta.hpp doctest_with_main)
|
||||
|
||||
target_compile_options(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
||||
#include "doctest.h"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,14 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "doctest.h"
|
||||
|
||||
// https://github.com/onqtam/doctest/issues/126
|
||||
#include <iostream>
|
||||
|
||||
#define STATIC_CHECK(...)\
|
||||
static_assert(__VA_ARGS__, #__VA_ARGS__);\
|
||||
CHECK(__VA_ARGS__)
|
||||
|
||||
#define STATIC_CHECK_FALSE(...)\
|
||||
static_assert(!(__VA_ARGS__), "!(" #__VA_ARGS__ ")");\
|
||||
CHECK(!(__VA_ARGS__))
|
||||
@@ -7,4 +7,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <meta.hpp/meta_all.hpp>
|
||||
#include "doctest/doctest.hpp"
|
||||
#include <doctest/doctest.h>
|
||||
|
||||
1
vendors/doctest
vendored
Submodule
1
vendors/doctest
vendored
Submodule
Submodule vendors/doctest added at 4d8716f1ef
Reference in New Issue
Block a user