Add unit test for simplified core.hpp header (#824)
* Add unit test for simplified core.hpp header
This commit is contained in:
parent
2d8694a8f4
commit
f699e25ab8
@ -29,6 +29,7 @@ add_executable (
|
||||
main.cpp
|
||||
nullable.cpp
|
||||
pipeline.cpp
|
||||
simplified_header.cpp
|
||||
string.cpp
|
||||
telemetry_policy.cpp
|
||||
transport_adapter.cpp
|
||||
|
||||
34
sdk/core/azure-core/test/ut/simplified_header.cpp
Normal file
34
sdk/core/azure-core/test/ut/simplified_header.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/**
|
||||
* @brief makes sure azure/core.hpp can be included.
|
||||
*
|
||||
* @remark This file will catch any issue while trying to use/include the core.hpp header
|
||||
*
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include <azure/core.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
TEST(Logging, simplifiedHeader)
|
||||
{
|
||||
EXPECT_NO_THROW(Azure::Core::Context c);
|
||||
EXPECT_NO_THROW(Azure::Core::DateTime::DateTime::FromSeconds(10));
|
||||
EXPECT_NO_THROW(Azure::Core::Nullable<int> n);
|
||||
EXPECT_NO_THROW(Azure::Core::Http::RawResponse r(
|
||||
1, 1, Azure::Core::Http::HttpStatusCode::Accepted, "phrase"));
|
||||
EXPECT_NO_THROW(Azure::Core::Strings::ToLower("A"));
|
||||
EXPECT_NO_THROW(Azure::Core::Uuid::CreateUuid());
|
||||
EXPECT_NO_THROW(Azure::Core::Version::VersionString());
|
||||
|
||||
{
|
||||
std::vector<uint8_t> buffer(10);
|
||||
EXPECT_NO_THROW(Azure::Core::Http::MemoryBodyStream mb(buffer));
|
||||
}
|
||||
EXPECT_NO_THROW(Azure::Core::Http::TelemetryPolicy tp("", ""));
|
||||
EXPECT_NO_THROW(Azure::Core::Http::HttpPipeline pipeline(
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>>(1)));
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user