mirror of
https://github.com/BlackMATov/flat.hpp.git
synced 2025-12-13 01:36:27 +07:00
little tests refactoring
This commit is contained in:
@@ -16,7 +16,7 @@ endif()
|
|||||||
# executable
|
# executable
|
||||||
#
|
#
|
||||||
|
|
||||||
file(GLOB 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} flat.hpp)
|
target_link_libraries(${PROJECT_NAME} flat.hpp)
|
||||||
|
|
||||||
|
|||||||
2
untests/doctest/doctest.cpp
Normal file
2
untests/doctest/doctest.cpp
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
||||||
|
#include "doctest.h"
|
||||||
11
untests/doctest/doctest.hpp
Normal file
11
untests/doctest/doctest.hpp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "doctest.h"
|
||||||
|
|
||||||
|
#define STATIC_REQUIRE(...)\
|
||||||
|
static_assert(__VA_ARGS__, #__VA_ARGS__);\
|
||||||
|
REQUIRE(__VA_ARGS__);
|
||||||
|
|
||||||
|
#define STATIC_REQUIRE_FALSE(...)\
|
||||||
|
static_assert(!(__VA_ARGS__), "!(" #__VA_ARGS__ ")");\
|
||||||
|
REQUIRE(!(__VA_ARGS__));
|
||||||
@@ -5,9 +5,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <flat.hpp/flat.hpp>
|
#include <flat.hpp/flat.hpp>
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
|
||||||
#include "doctest/doctest.h"
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@@ -5,9 +5,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <flat.hpp/flat_map.hpp>
|
#include <flat.hpp/flat_map.hpp>
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
#include "doctest/doctest.h"
|
|
||||||
#include "flat_tests.hpp"
|
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
@@ -5,9 +5,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <flat.hpp/flat_multimap.hpp>
|
#include <flat.hpp/flat_multimap.hpp>
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
#include "doctest/doctest.h"
|
|
||||||
#include "flat_tests.hpp"
|
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
@@ -5,9 +5,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <flat.hpp/flat_multiset.hpp>
|
#include <flat.hpp/flat_multiset.hpp>
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
#include "doctest/doctest.h"
|
|
||||||
#include "flat_tests.hpp"
|
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
@@ -5,9 +5,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <flat.hpp/flat_set.hpp>
|
#include <flat.hpp/flat_set.hpp>
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
#include "doctest/doctest.h"
|
|
||||||
#include "flat_tests.hpp"
|
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
/*******************************************************************************
|
|
||||||
* This file is part of the "https://github.com/blackmatov/flat.hpp"
|
|
||||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
|
||||||
* Copyright (C) 2019-2020, by Matvey Cherevko (blackmatov@gmail.com)
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
#define STATIC_REQUIRE(...)\
|
|
||||||
static_assert(__VA_ARGS__, #__VA_ARGS__);\
|
|
||||||
REQUIRE(__VA_ARGS__);
|
|
||||||
|
|
||||||
#define STATIC_REQUIRE_FALSE(...)\
|
|
||||||
static_assert(!(__VA_ARGS__), "!(" #__VA_ARGS__ ")");\
|
|
||||||
REQUIRE(!(__VA_ARGS__));
|
|
||||||
Reference in New Issue
Block a user