diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 9d0feb9..0000000 --- a/.clang-format +++ /dev/null @@ -1,55 +0,0 @@ -# Generated from CLion C/C++ Code Style settings ---- -Language: Cpp -BasedOnStyle: LLVM -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignOperands: false -AlignTrailingComments: false -AlwaysBreakTemplateDeclarations: Yes -BraceWrapping: - AfterCaseLabel: true - AfterClass: true - AfterControlStatement: true - AfterEnum: true - AfterFunction: true - AfterNamespace: true - AfterStruct: true - AfterUnion: true - AfterExternBlock: true - BeforeCatch: true - BeforeElse: true - BeforeLambdaBody: true - BeforeWhile: true - SplitEmptyFunction: true - SplitEmptyRecord: true - SplitEmptyNamespace: true -BreakBeforeBraces: Custom -BreakConstructorInitializers: AfterColon -BreakConstructorInitializersBeforeComma: false -ColumnLimit: 100 -ConstructorInitializerAllOnOneLineOrOnePerLine: false -ContinuationIndentWidth: 2 -IncludeCategories: - - Regex: '^<.*' - Priority: 1 - - Regex: '^".*' - Priority: 2 - - Regex: '.*' - Priority: 3 -IncludeIsMainRegex: '([-_](test|unittest))?$' -IndentAccessModifiers: True -IndentCaseBlocks: true -InsertNewlineAtEOF: true -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 2 -PointerAlignment: Left -SpaceInEmptyParentheses: false -SpacesInAngles: false -SpacesInConditionalStatement: false -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -TabWidth: 2 -AccessModifierOffset: 1 -... diff --git a/CMakeLists.txt b/CMakeLists.txt index 509755c..401c069 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,8 @@ add_executable(App ./src/main.cpp ./src/helpers/helpers.h ./src/helpers/helpers.cpp ./src/endpoints_handlers/HandleRequest.h - ./src/endpoints_handlers/AuthController.h - ./src/endpoints_handlers/AuthController.cpp + ./src/endpoints_handlers/IController.h + ./src/endpoints_handlers/Controller.h ./src/session/HttpSession.h ./src/session/HttpSession.cpp ./src/session/WebsocketSession.h @@ -48,3 +48,15 @@ add_executable(HelpersTests ./tests/helpers/helpers_TEST.cpp ./src/helpers/helpers.cpp) target_link_libraries(HelpersTests PRIVATE Boost::boost) add_test(HelpersTests HelpersTests) + +add_executable(ControllerTests ./tests/endpoint_handlers/Controller_TEST.cpp + ./src/endpoints_handlers/IController.h + ./src/endpoints_handlers/Controller.h) +target_link_libraries(ControllerTests PRIVATE Boost::boost) +add_test(ControllerTests ControllerTests) + +if (WIN32) + target_compile_definitions(App PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) + target_compile_definitions(HelpersTests PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) + target_compile_definitions(ControllerTests PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) +endif() diff --git a/Nihilus.xml b/Nihilus.xml index 13e08d1..e1c3aff 100644 --- a/Nihilus.xml +++ b/Nihilus.xml @@ -1,5 +1,6 @@