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:
parent
d61e106e89
commit
3822ca8729
@ -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()
|
||||
|
||||
@ -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>
|
||||
@ -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>
|
||||
@ -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
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user