common header for all unit tests

This commit is contained in:
2018-08-06 03:11:21 +07:00
parent 6b5fbde442
commit ad872cc56f
12 changed files with 61 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
function(add_e2d_sample NAME)
set(SAMPLE_NAME sample_${NAME})
file(GLOB_RECURSE ${SAMPLE_NAME}_sources
file(GLOB ${SAMPLE_NAME}_sources
sources/*.*
sources/${SAMPLE_NAME}/*.*)
set(SAMPLE_SOURCES ${${SAMPLE_NAME}_sources})

View File

@@ -1,6 +1,7 @@
function(add_e2d_tests NAME)
set(TESTS_NAME untests_${NAME})
file(GLOB_RECURSE ${TESTS_NAME}_sources
file(GLOB ${TESTS_NAME}_sources
sources/*.*
sources/${TESTS_NAME}/*.*)
set(TESTS_SOURCES ${${TESTS_NAME}_sources})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${TESTS_SOURCES})

View File

@@ -0,0 +1,7 @@
/*******************************************************************************
* This file is part of the "Enduro2D"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018 Matvey Cherevko
******************************************************************************/
#include "common.hpp"

View File

@@ -0,0 +1,11 @@
/*******************************************************************************
* This file is part of the "Enduro2D"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018 Matvey Cherevko
******************************************************************************/
#pragma once
#include "../catch/catch.hpp"
#include <enduro2d/enduro2d.hpp>
using namespace e2d;

View File

@@ -5,10 +5,7 @@
******************************************************************************/
#define CATCH_CONFIG_MAIN
#include "../../catch/catch.hpp"
#include <enduro2d/enduro2d.hpp>
using namespace e2d;
#include "_base.hpp"
TEST_CASE("base") {
}

View File

@@ -0,0 +1,9 @@
/*******************************************************************************
* This file is part of the "Enduro2D"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018 Matvey Cherevko
******************************************************************************/
#pragma once
#include "../common.hpp"

View File

@@ -5,10 +5,7 @@
******************************************************************************/
#define CATCH_CONFIG_MAIN
#include "../../catch/catch.hpp"
#include <enduro2d/enduro2d.hpp>
using namespace e2d;
#include "_core.hpp"
TEST_CASE("core") {
}

View File

@@ -0,0 +1,9 @@
/*******************************************************************************
* This file is part of the "Enduro2D"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018 Matvey Cherevko
******************************************************************************/
#pragma once
#include "../common.hpp"

View File

@@ -5,10 +5,7 @@
******************************************************************************/
#define CATCH_CONFIG_MAIN
#include "../../catch/catch.hpp"
#include <enduro2d/enduro2d.hpp>
using namespace e2d;
#include "_math.hpp"
TEST_CASE("math") {
}

View File

@@ -0,0 +1,9 @@
/*******************************************************************************
* This file is part of the "Enduro2D"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018 Matvey Cherevko
******************************************************************************/
#pragma once
#include "../common.hpp"

View File

@@ -5,10 +5,7 @@
******************************************************************************/
#define CATCH_CONFIG_MAIN
#include "../../catch/catch.hpp"
#include <enduro2d/enduro2d.hpp>
using namespace e2d;
#include "_utils.hpp"
TEST_CASE("utils") {
}

View File

@@ -0,0 +1,9 @@
/*******************************************************************************
* This file is part of the "Enduro2D"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018 Matvey Cherevko
******************************************************************************/
#pragma once
#include "../common.hpp"