diff options
author | Justin Berger <j.david.berger@gmail.com> | 2017-11-10 03:52:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-11-29 21:36:31 (GMT) |
commit | 90f8db269fcc6978badd93b5f985dee2e01feab3 (patch) | |
tree | b81a3c441746cf140249a6e58fc27c30157b1009 /Tests | |
parent | b56b51fcafabc678e90474871cd282450949152a (diff) | |
download | CMake-90f8db269fcc6978badd93b5f985dee2e01feab3.zip CMake-90f8db269fcc6978badd93b5f985dee2e01feab3.tar.gz CMake-90f8db269fcc6978badd93b5f985dee2e01feab3.tar.bz2 |
tests: unconditionally enabled server tests
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/CMakeServerLib/testServerBuffering.cpp | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 4a7b8c9..18fed75 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -149,9 +149,7 @@ if(BUILD_TESTING) if(NOT CMake_TEST_EXTERNAL_CMAKE) add_subdirectory(CMakeLib) - if(CMake_TEST_SERVER_MODE) - add_subdirectory(CMakeServerLib) - endif() + add_subdirectory(CMakeServerLib) endif() add_subdirectory(CMakeOnly) add_subdirectory(RunCMake) diff --git a/Tests/CMakeServerLib/testServerBuffering.cpp b/Tests/CMakeServerLib/testServerBuffering.cpp index 97be891..7330ead 100644 --- a/Tests/CMakeServerLib/testServerBuffering.cpp +++ b/Tests/CMakeServerLib/testServerBuffering.cpp @@ -1,7 +1,6 @@ #include "cmConnection.h" #include "cmServerConnection.h" #include <iostream> -#include <stddef.h> #include <string> #include <vector> @@ -51,8 +50,8 @@ int testServerBuffering(int, char** const) std::unique_ptr<cmConnectionBufferStrategy>(new cmServerBufferStrategy); std::vector<std::string> response; std::string rawBuffer; - for (size_t i = 0; i < fullMessage.size(); i++) { - rawBuffer += fullMessage[i]; + for (auto& messageChar : fullMessage) { + rawBuffer += messageChar; std::string packet = bufferingStrategy->BufferMessage(rawBuffer); do { if (!packet.empty() && packet != "\r\n") { |