use private as suffix for private headers (#1040)

fixes: https://github.com/Azure/azure-sdk-for-cpp/issues/1039

Adding `private` suffix for private headers.

Updating core test CMake script to include the /src folder from CORE to expose the private headers to the tests. Then tests don't need to do relative-path includes.
This commit is contained in:
Victor Vazquez 2020-12-02 17:16:46 -08:00 committed by GitHub
parent d61e106e89
commit 3822ca8729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 16 additions and 13 deletions

View File

@ -8,9 +8,9 @@
#include "azure/core/internal/log.hpp"
// Private incude
#include "curl_connection.hpp"
#include "curl_connection_pool.hpp"
#include "curl_session.hpp"
#include "curl_connection_pool_private.hpp"
#include "curl_connection_private.hpp"
#include "curl_session_private.hpp"
#ifdef POSIX
#include <poll.h> // for poll()

View File

@ -11,7 +11,7 @@
#include "azure/core/http/http.hpp"
#include "curl_connection.hpp"
#include "curl_connection_private.hpp"
#include <curl/curl.h>
#include <list>

View File

@ -13,8 +13,8 @@
#include "azure/core/http/http.hpp"
#include "curl_connection.hpp"
#include "curl_connection_pool.hpp"
#include "curl_connection_pool_private.hpp"
#include "curl_connection_private.hpp"
#include <memory>
#include <string>

View File

@ -47,6 +47,9 @@ add_executable (
uuid.cpp
)
# Adding private headers from CORE to the tests so we can test the private APIs with no relative paths include.
target_include_directories (${TARGET_NAME} PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../src>)
target_link_libraries(${TARGET_NAME} PRIVATE azure-core gtest gmock)
# gtest_add_tests will scan the test from azure-core-test and call add_test

View File

@ -12,8 +12,8 @@
#include <azure/core/http/curl/curl.hpp>
#include "../../src/http/curl/curl_connection.hpp"
#include "../../src/http/curl/curl_session.hpp"
#include <http/curl/curl_connection_private.hpp>
#include <http/curl/curl_session_private.hpp>
#include <string>
#include <vector>

View File

@ -15,7 +15,7 @@
#include <gtest/gtest.h>
#include <string>
#include "../../src/http/curl/curl_connection_pool.hpp"
#include <http/curl/curl_connection_pool_private.hpp>
namespace Azure { namespace Core { namespace Test {

View File

@ -6,8 +6,8 @@
#include <azure/core/http/curl/curl.hpp>
#include <azure/core/http/http.hpp>
#include "../../src/http/curl/curl_connection.hpp"
#include "../../src/http/curl/curl_session.hpp"
#include <http/curl/curl_connection_private.hpp>
#include <http/curl/curl_session_private.hpp>
using ::testing::_;
using ::testing::DoAll;

View File

@ -8,8 +8,8 @@
#include <string>
#include <thread>
#include "../../src/http/curl/curl_connection.hpp"
#include "../../src/http/curl/curl_connection_pool.hpp"
#include <http/curl/curl_connection_private.hpp>
#include <http/curl/curl_connection_pool_private.hpp>
using testing::ValuesIn;