Merge pull request #3 from BlackMATov/dev

Dev
This commit is contained in:
2020-11-30 21:49:35 +07:00
committed by GitHub
12 changed files with 22 additions and 43 deletions

View File

@@ -11,7 +11,7 @@ lcov -d . -z
ctest --verbose
lcov -d . -c -o "coverage.info"
lcov -r "coverage.info" "*/usr/*" "*/doctest/*" "*/untests/*" -o "coverage.info"
lcov -r "coverage.info" "*/usr/*" "*/untests/*" -o "coverage.info"
lcov -l "coverage.info"
bash <(curl -s https://codecov.io/bash) -f "coverage.info" || echo "Codecov did not collect coverage reports"

View File

@@ -16,7 +16,7 @@ endif()
# executable
#
file(GLOB UNTESTS_SOURCES "*.cpp" "*.hpp")
file(GLOB_RECURSE UNTESTS_SOURCES "*.cpp" "*.hpp")
add_executable(${PROJECT_NAME} ${UNTESTS_SOURCES})
target_link_libraries(${PROJECT_NAME} vmath.hpp)

View File

@@ -0,0 +1,2 @@
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"

View 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__));

View File

@@ -4,10 +4,8 @@
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include <vmath.hpp/vmath_ext.hpp>
#include "doctest/doctest.h"
#include "vmath_tests.hpp"
#include "doctest/doctest.hpp"
#include <set>
#include <map>

View File

@@ -4,10 +4,8 @@
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include <vmath.hpp/vmath_fun.hpp>
#include "doctest/doctest.h"
#include "vmath_tests.hpp"
#include "doctest/doctest.hpp"
namespace
{

View File

@@ -4,10 +4,8 @@
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include <vmath.hpp/vmath_ext.hpp>
#include "doctest/doctest.h"
#include "vmath_tests.hpp"
#include "doctest/doctest.hpp"
namespace
{

View File

@@ -4,11 +4,8 @@
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include <vmath.hpp/vmath_mat.hpp>
#include <vmath.hpp/vmath_mat_fun.hpp>
#include "doctest/doctest.h"
#include "vmath_tests.hpp"
#include "doctest/doctest.hpp"
namespace
{

View File

@@ -1,8 +0,0 @@
/*******************************************************************************
* This file is part of the "https://github.com/blackmatov/vmath.hpp"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest/doctest.h"

View File

@@ -4,22 +4,10 @@
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include <vmath.hpp/vmath_vec.hpp>
#include <vmath.hpp/vmath_vec_fun.hpp>
#include <vmath.hpp/vmath_mat.hpp>
#include <vmath.hpp/vmath_mat_fun.hpp>
#include <vmath.hpp/vmath.hpp>
#include <cfloat>
#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__));
namespace vmath_tests
{
using namespace vmath_hpp;

View File

@@ -4,10 +4,8 @@
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include <vmath.hpp/vmath_ext.hpp>
#include "doctest/doctest.h"
#include "vmath_tests.hpp"
#include "doctest/doctest.hpp"
namespace
{

View File

@@ -4,11 +4,8 @@
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include <vmath.hpp/vmath_vec.hpp>
#include <vmath.hpp/vmath_vec_fun.hpp>
#include "doctest/doctest.h"
#include "vmath_tests.hpp"
#include "doctest/doctest.hpp"
namespace
{