mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2024-11-23 00:33:44 +00:00
Make a new test project for full-page testing.
This commit is contained in:
parent
e2437a6b12
commit
9f8d89895d
5 changed files with 50 additions and 1 deletions
|
@ -29,4 +29,5 @@ install(DIRECTORY html/website/ DESTINATION html)
|
|||
|
||||
if (BUILD_TESTING)
|
||||
add_subdirectory(test/unit)
|
||||
add_subdirectory(test/simulation)
|
||||
endif()
|
||||
|
|
27
test/simulation/CMakeLists.txt
Normal file
27
test/simulation/CMakeLists.txt
Normal file
|
@ -0,0 +1,27 @@
|
|||
project(tawashi_simulation CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wpedantic -Wconversion -Werror")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_DEBUG} -Wall -Wpedantic -Wconversion -Werror")
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
check.cpp
|
||||
test_index_response.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE ${TAWASHI_SOURCE_ROOT}/lib/Catch/single_include
|
||||
PRIVATE ${TAWASHI_GEN_INCLUDE_DIR}
|
||||
)
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE tawashi_implem
|
||||
PRIVATE duckhandy
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME TawashiSimulationTest
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${PROJECT_NAME}
|
||||
)
|
19
test/simulation/check.cpp
Normal file
19
test/simulation/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"
|
|
@ -24,6 +24,7 @@
|
|||
#include <sstream>
|
||||
#include <utility>
|
||||
#include <string>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
namespace {
|
||||
const char g_mustache_html[] =
|
||||
|
@ -74,6 +75,8 @@ namespace tawashi {
|
|||
TEST_CASE ("Index response", "[index][response]") {
|
||||
using curry::SafeStackObject;
|
||||
|
||||
auto statuslog = spdlog::stdout_logger_st("statuslog");
|
||||
|
||||
const char* const env_raw[] = {
|
||||
"AUTH_TYPE=",
|
||||
"CONTENT_TYPE=",
|
|
@ -12,7 +12,6 @@ add_executable(${PROJECT_NAME}
|
|||
check.cpp
|
||||
test_ini_file.cpp
|
||||
test_settings_bag.cpp
|
||||
test_index_response.cpp
|
||||
test_invalid_utf8_post.cpp
|
||||
../data/UTF-8-test.txt.c
|
||||
test_invalid_utf8_get.cpp
|
||||
|
|
Loading…
Reference in a new issue