mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-08-03 12:50:02 +00:00
Add unit test for IndexResponse.
This commit is contained in:
parent
f5f19350ea
commit
df384f5128
7 changed files with 312 additions and 21 deletions
|
@ -8,6 +8,8 @@ add_executable(${PROJECT_NAME}
|
|||
)
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE tawashi_implem
|
||||
#hack - add duckhandy to the project instead of picking from inside redis
|
||||
PRIVATE duckhandy
|
||||
)
|
||||
|
||||
set_target_properties(
|
||||
|
@ -17,8 +19,6 @@ set_target_properties(
|
|||
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE ${TAWASHI_GEN_INCLUDE_DIR}
|
||||
#hack - add duckhandy to the project instead of picking from inside redis
|
||||
PRIVATE ${TAWASHI_SOURCE_ROOT}/lib/incredis/lib/duckhandy/include
|
||||
)
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION lib
|
||||
|
|
|
@ -23,3 +23,10 @@
|
|||
#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@
|
||||
#define VERSION_MINOR @PROJECT_VERSION_MINOR@
|
||||
#define VERSION_PATCH @PROJECT_VERSION_PATCH@
|
||||
#cmakedefine BUILD_TESTING
|
||||
|
||||
#if defined(BUILD_TESTING)
|
||||
# define virtual_testing virtual
|
||||
#else
|
||||
# define virtual_testing
|
||||
#endif
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "duckhandy/compatibility.h"
|
||||
#include "escapist.hpp"
|
||||
#include "kakoune/safe_ptr.hh"
|
||||
#include "tawashiConfig.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <boost/utility/string_ref.hpp>
|
||||
|
@ -42,27 +43,27 @@ namespace tawashi {
|
|||
typedef boost::container::flat_map<std::string, std::string> GetMapType;
|
||||
|
||||
Env();
|
||||
~Env() noexcept;
|
||||
virtual_testing ~Env() noexcept;
|
||||
|
||||
const std::string& auth_type() const;
|
||||
std::size_t content_length() const;
|
||||
const std::string& content_type() const;
|
||||
boost::optional<VersionInfo> gateway_interface() const a_pure;
|
||||
const std::string& path_info() const;
|
||||
const std::string& path_translated() const;
|
||||
const std::string& query_string() const;
|
||||
const std::string& remote_addr() const;
|
||||
const std::string& remote_host() const;
|
||||
const std::string& remote_ident() const;
|
||||
const std::string& remote_user() const;
|
||||
const std::string& request_method() const;
|
||||
const std::string& script_name() const;
|
||||
const std::string& server_name() const;
|
||||
uint16_t server_port() const a_pure;
|
||||
boost::optional<VersionInfo> server_protocol() const a_pure;
|
||||
const std::string& server_software() const;
|
||||
virtual_testing const std::string& auth_type() const;
|
||||
virtual_testing std::size_t content_length() const;
|
||||
virtual_testing const std::string& content_type() const;
|
||||
virtual_testing boost::optional<VersionInfo> gateway_interface() const a_pure;
|
||||
virtual_testing const std::string& path_info() const;
|
||||
virtual_testing const std::string& path_translated() const;
|
||||
virtual_testing const std::string& query_string() const;
|
||||
virtual_testing const std::string& remote_addr() const;
|
||||
virtual_testing const std::string& remote_host() const;
|
||||
virtual_testing const std::string& remote_ident() const;
|
||||
virtual_testing const std::string& remote_user() const;
|
||||
virtual_testing const std::string& request_method() const;
|
||||
virtual_testing const std::string& script_name() const;
|
||||
virtual_testing const std::string& server_name() const;
|
||||
virtual_testing uint16_t server_port() const a_pure;
|
||||
virtual_testing boost::optional<VersionInfo> server_protocol() const a_pure;
|
||||
virtual_testing const std::string& server_software() const;
|
||||
|
||||
GetMapType query_string_split() const a_pure;
|
||||
virtual_testing GetMapType query_string_split() const a_pure;
|
||||
|
||||
std::ostream& print_all (std::ostream& parStream, const char* parNewline) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue