mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-08-03 12:50:02 +00:00
Fix tests' build.
This commit is contained in:
parent
defc365d21
commit
2293604e11
4 changed files with 13 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
||||||
project(tawashi_simulation CXX)
|
project(kamokan_simulation CXX)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
@ -16,7 +16,7 @@ target_include_directories(${PROJECT_NAME}
|
||||||
PRIVATE ${TAWASHI_GEN_INCLUDE_DIR}
|
PRIVATE ${TAWASHI_GEN_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
PRIVATE tawashi_implem
|
PRIVATE tawashi
|
||||||
PRIVATE duckhandy
|
PRIVATE duckhandy
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/* Copyright 2017, Michele Santullo
|
/* Copyright 2017, Michele Santullo
|
||||||
* This file is part of "tawashi".
|
* This file is part of "kamokan".
|
||||||
*
|
*
|
||||||
* "tawashi" is free software: you can redistribute it and/or modify
|
* "kamokan" is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* "tawashi" is distributed in the hope that it will be useful,
|
* "kamokan" is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with "tawashi". If not, see <http://www.gnu.org/licenses/>.
|
* along with "kamokan". If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
@ -99,17 +99,17 @@ TEST_CASE ("Index response", "[index][response]") {
|
||||||
};
|
};
|
||||||
SafeStackObject<tawashi::cgi::Env> fake_env(env_raw, "/");
|
SafeStackObject<tawashi::cgi::Env> fake_env(env_raw, "/");
|
||||||
|
|
||||||
std::string tawashi_settings(
|
std::string kamokan_settings(
|
||||||
"[tawashi]\n"
|
"[kamokan]\n"
|
||||||
" host_name = 127.0.0.1\n"
|
" host_name = 127.0.0.1\n"
|
||||||
" website_root = /home/michele/dev/code/cpp/tawashi/html\n"
|
" website_root = /home/michele/dev/code/cpp/kamokan/html\n"
|
||||||
" logging_level = debug\n"
|
" logging_level = debug\n"
|
||||||
" langmap_dir = /usr/share/source-highlight\n"
|
" langmap_dir = /usr/share/source-highlight\n"
|
||||||
" host_path = /\n"
|
" host_path = /\n"
|
||||||
" host_port =\n"
|
" host_port =\n"
|
||||||
);
|
);
|
||||||
SafeStackObject<tawashi::IniFile> ini(std::move(tawashi_settings));
|
SafeStackObject<tawashi::IniFile> ini(std::move(kamokan_settings));
|
||||||
SafeStackObject<tawashi::SettingsBag> settings(ini);
|
SafeStackObject<tawashi::SettingsBag> settings(ini, "kamokan");
|
||||||
|
|
||||||
std::stringstream response_stream;
|
std::stringstream response_stream;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ target_include_directories(${PROJECT_NAME}
|
||||||
PRIVATE ${GLIB_INCLUDE_DIRS}
|
PRIVATE ${GLIB_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
PRIVATE tawashi_implem
|
PRIVATE tawashi
|
||||||
PRIVATE duckhandy
|
PRIVATE duckhandy
|
||||||
PRIVATE ${GLIB_LIBRARIES}
|
PRIVATE ${GLIB_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
|
@ -50,7 +50,7 @@ TEST_CASE ("Add and retrieve values from SettingsBag", "[settings][ini]") {
|
||||||
auto ini = SafeStackObject<IniFile>(std::istream_iterator<char>(ss), std::istream_iterator<char>());
|
auto ini = SafeStackObject<IniFile>(std::istream_iterator<char>(ss), std::istream_iterator<char>());
|
||||||
CHECK(ini->parse_success());
|
CHECK(ini->parse_success());
|
||||||
REQUIRE(ini->parsed_characters() == raw_ini_char_count);
|
REQUIRE(ini->parsed_characters() == raw_ini_char_count);
|
||||||
SettingsBag settings(ini);
|
SettingsBag settings(ini, "tawashi");
|
||||||
|
|
||||||
CHECK(settings["redis_server"] == "127.0.0.1");
|
CHECK(settings["redis_server"] == "127.0.0.1");
|
||||||
CHECK(settings["empty"].empty());
|
CHECK(settings["empty"].empty());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue