mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2024-11-27 00:43:47 +00:00
Add an empty unit test.
This commit is contained in:
parent
e1687c96ff
commit
85363e0db1
6 changed files with 49 additions and 1 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -13,3 +13,6 @@
|
||||||
[submodule "lib/spdlog"]
|
[submodule "lib/spdlog"]
|
||||||
path = lib/spdlog
|
path = lib/spdlog
|
||||||
url = https://github.com/gabime/spdlog.git
|
url = https://github.com/gabime/spdlog.git
|
||||||
|
[submodule "lib/Catch"]
|
||||||
|
path = lib/Catch
|
||||||
|
url = https://github.com/philsquared/Catch.git
|
||||||
|
|
|
@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||||
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
|
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
|
||||||
project(tawashi_top VERSION 0.1.3 LANGUAGES NONE)
|
project(tawashi_top VERSION 0.1.3 LANGUAGES NONE)
|
||||||
|
|
||||||
|
include(CTest)
|
||||||
|
|
||||||
|
set(INCREDIS_FORCE_DISABLE_TESTS ON)
|
||||||
set(TAWASHI_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
|
set(TAWASHI_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
set(TAWASHI_GEN_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")
|
set(TAWASHI_GEN_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")
|
||||||
set(TAWASHI_CONFIG_PATH "etc" CACHE STRING "Path where config file will be located, absolute or relative to the install prefix")
|
set(TAWASHI_CONFIG_PATH "etc" CACHE STRING "Path where config file will be located, absolute or relative to the install prefix")
|
||||||
|
@ -19,3 +22,7 @@ add_subdirectory(src/tawashi_implem)
|
||||||
add_subdirectory(src/tawashi)
|
add_subdirectory(src/tawashi)
|
||||||
|
|
||||||
install(DIRECTORY html DESTINATION .)
|
install(DIRECTORY html DESTINATION .)
|
||||||
|
|
||||||
|
if (BUILD_TESTING)
|
||||||
|
add_subdirectory(test/unit)
|
||||||
|
endif()
|
||||||
|
|
1
lib/Catch
Submodule
1
lib/Catch
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 5604ec7266e54fc38dbbe3bca1b50beef3d39fc2
|
|
@ -1 +1 @@
|
||||||
Subproject commit f798a6999b0d6c9967a274727ec12bd9a3efdfb4
|
Subproject commit 69221f811cbc02b8c5c55460f2c8cd0a72f9f8ac
|
18
test/unit/CMakeLists.txt
Normal file
18
test/unit/CMakeLists.txt
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
project(tawashi_unittest CXX)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME}
|
||||||
|
check.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PRIVATE ${TAWASHI_SOURCE_ROOT}/lib/Catch/single_include
|
||||||
|
)
|
||||||
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
PRIVATE tawashi_implem
|
||||||
|
)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME TawashiUnitTest
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND ${PROJECT_NAME}
|
||||||
|
)
|
19
test/unit/check.cpp
Normal file
19
test/unit/check.cpp
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/* Copyright 2017, Michele Santullo
|
||||||
|
* This file is part of "tawashi".
|
||||||
|
*
|
||||||
|
* "tawashi" is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* "tawashi" is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with "tawashi". If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CATCH_CONFIG_MAIN
|
||||||
|
#include "catch.hpp"
|
Loading…
Reference in a new issue