mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-16 22:17:02 +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"]
|
[submodule "vendors/kari.hpp"]
|
||||||
path = vendors/kari.hpp
|
path = vendors/kari.hpp
|
||||||
url = https://github.com/BlackMATov/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)
|
option(BUILD_WITH_UNTESTS "Build with unit tests" ON)
|
||||||
if(BUILD_WITH_UNTESTS)
|
if(BUILD_WITH_UNTESTS)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
add_subdirectory(vendors/doctest)
|
||||||
add_subdirectory(untests)
|
add_subdirectory(untests)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ endif()
|
|||||||
|
|
||||||
file(GLOB_RECURSE UNTESTS_SOURCES "*.cpp" "*.hpp")
|
file(GLOB_RECURSE UNTESTS_SOURCES "*.cpp" "*.hpp")
|
||||||
add_executable(${PROJECT_NAME} ${UNTESTS_SOURCES})
|
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}
|
target_compile_options(${PROJECT_NAME}
|
||||||
PRIVATE
|
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
|
#pragma once
|
||||||
|
|
||||||
#include <meta.hpp/meta_all.hpp>
|
#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