mirror of
https://github.com/BlackMATov/vmath.hpp.git
synced 2025-12-16 14:11:28 +07:00
little tests refactoring
This commit is contained in:
@@ -11,7 +11,7 @@ lcov -d . -z
|
|||||||
ctest --verbose
|
ctest --verbose
|
||||||
|
|
||||||
lcov -d . -c -o "coverage.info"
|
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"
|
lcov -l "coverage.info"
|
||||||
|
|
||||||
bash <(curl -s https://codecov.io/bash) -f "coverage.info" || echo "Codecov did not collect coverage reports"
|
bash <(curl -s https://codecov.io/bash) -f "coverage.info" || echo "Codecov did not collect coverage reports"
|
||||||
|
|||||||
@@ -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} vmath.hpp)
|
target_link_libraries(${PROJECT_NAME} vmath.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__));
|
||||||
@@ -4,10 +4,8 @@
|
|||||||
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <vmath.hpp/vmath_ext.hpp>
|
|
||||||
|
|
||||||
#include "doctest/doctest.h"
|
|
||||||
#include "vmath_tests.hpp"
|
#include "vmath_tests.hpp"
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <vmath.hpp/vmath_fun.hpp>
|
|
||||||
|
|
||||||
#include "doctest/doctest.h"
|
|
||||||
#include "vmath_tests.hpp"
|
#include "vmath_tests.hpp"
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <vmath.hpp/vmath_ext.hpp>
|
|
||||||
|
|
||||||
#include "doctest/doctest.h"
|
|
||||||
#include "vmath_tests.hpp"
|
#include "vmath_tests.hpp"
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,11 +4,8 @@
|
|||||||
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
* 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 "vmath_tests.hpp"
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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"
|
|
||||||
@@ -4,22 +4,10 @@
|
|||||||
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <vmath.hpp/vmath_vec.hpp>
|
#include <vmath.hpp/vmath.hpp>
|
||||||
#include <vmath.hpp/vmath_vec_fun.hpp>
|
|
||||||
|
|
||||||
#include <vmath.hpp/vmath_mat.hpp>
|
|
||||||
#include <vmath.hpp/vmath_mat_fun.hpp>
|
|
||||||
|
|
||||||
#include <cfloat>
|
#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
|
namespace vmath_tests
|
||||||
{
|
{
|
||||||
using namespace vmath_hpp;
|
using namespace vmath_hpp;
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <vmath.hpp/vmath_ext.hpp>
|
|
||||||
|
|
||||||
#include "doctest/doctest.h"
|
|
||||||
#include "vmath_tests.hpp"
|
#include "vmath_tests.hpp"
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,11 +4,8 @@
|
|||||||
* Copyright (C) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
* 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 "vmath_tests.hpp"
|
||||||
|
#include "doctest/doctest.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user