mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-15 00:11:55 +07:00
common header for all unit tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
function(add_e2d_sample NAME)
|
function(add_e2d_sample NAME)
|
||||||
set(SAMPLE_NAME sample_${NAME})
|
set(SAMPLE_NAME sample_${NAME})
|
||||||
file(GLOB_RECURSE ${SAMPLE_NAME}_sources
|
file(GLOB ${SAMPLE_NAME}_sources
|
||||||
sources/*.*
|
sources/*.*
|
||||||
sources/${SAMPLE_NAME}/*.*)
|
sources/${SAMPLE_NAME}/*.*)
|
||||||
set(SAMPLE_SOURCES ${${SAMPLE_NAME}_sources})
|
set(SAMPLE_SOURCES ${${SAMPLE_NAME}_sources})
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
function(add_e2d_tests NAME)
|
function(add_e2d_tests NAME)
|
||||||
set(TESTS_NAME untests_${NAME})
|
set(TESTS_NAME untests_${NAME})
|
||||||
file(GLOB_RECURSE ${TESTS_NAME}_sources
|
file(GLOB ${TESTS_NAME}_sources
|
||||||
|
sources/*.*
|
||||||
sources/${TESTS_NAME}/*.*)
|
sources/${TESTS_NAME}/*.*)
|
||||||
set(TESTS_SOURCES ${${TESTS_NAME}_sources})
|
set(TESTS_SOURCES ${${TESTS_NAME}_sources})
|
||||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${TESTS_SOURCES})
|
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${TESTS_SOURCES})
|
||||||
|
|||||||
7
untests/sources/common.cpp
Normal file
7
untests/sources/common.cpp
Normal 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"
|
||||||
11
untests/sources/common.hpp
Normal file
11
untests/sources/common.hpp
Normal 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;
|
||||||
@@ -5,10 +5,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include "../../catch/catch.hpp"
|
#include "_base.hpp"
|
||||||
|
|
||||||
#include <enduro2d/enduro2d.hpp>
|
|
||||||
using namespace e2d;
|
|
||||||
|
|
||||||
TEST_CASE("base") {
|
TEST_CASE("base") {
|
||||||
}
|
}
|
||||||
|
|||||||
9
untests/sources/untests_base/_base.hpp
Normal file
9
untests/sources/untests_base/_base.hpp
Normal 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"
|
||||||
@@ -5,10 +5,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include "../../catch/catch.hpp"
|
#include "_core.hpp"
|
||||||
|
|
||||||
#include <enduro2d/enduro2d.hpp>
|
|
||||||
using namespace e2d;
|
|
||||||
|
|
||||||
TEST_CASE("core") {
|
TEST_CASE("core") {
|
||||||
}
|
}
|
||||||
|
|||||||
9
untests/sources/untests_core/_core.hpp
Normal file
9
untests/sources/untests_core/_core.hpp
Normal 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"
|
||||||
@@ -5,10 +5,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include "../../catch/catch.hpp"
|
#include "_math.hpp"
|
||||||
|
|
||||||
#include <enduro2d/enduro2d.hpp>
|
|
||||||
using namespace e2d;
|
|
||||||
|
|
||||||
TEST_CASE("math") {
|
TEST_CASE("math") {
|
||||||
}
|
}
|
||||||
|
|||||||
9
untests/sources/untests_math/_math.hpp
Normal file
9
untests/sources/untests_math/_math.hpp
Normal 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"
|
||||||
@@ -5,10 +5,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include "../../catch/catch.hpp"
|
#include "_utils.hpp"
|
||||||
|
|
||||||
#include <enduro2d/enduro2d.hpp>
|
|
||||||
using namespace e2d;
|
|
||||||
|
|
||||||
TEST_CASE("utils") {
|
TEST_CASE("utils") {
|
||||||
}
|
}
|
||||||
|
|||||||
9
untests/sources/untests_utils/_utils.hpp
Normal file
9
untests/sources/untests_utils/_utils.hpp
Normal 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"
|
||||||
Reference in New Issue
Block a user