17 #include "gtest/gtest.h" 23 constexpr
int kLength = 50;
25 using ThrowerStorage =
27 using ThrowerList = std::array<ThrowerStorage, kLength>;
29 TEST(MakeUnique, CheckForLeaks) {
30 constexpr
int kValue = 321;
37 EXPECT_TRUE(tester.Test([](
Thrower* thrower) {
38 static_cast<void>(absl::make_unique<Thrower>(*thrower));
41 EXPECT_TRUE(tester.Test([](
Thrower* thrower) {
42 static_cast<void>(absl::make_unique<Thrower>(std::move(*thrower)));
46 EXPECT_TRUE(tester.Test([&](
Thrower*) {
47 static_cast<void>(absl::make_unique<Thrower[]>(kLength));
exceptions_internal::StrongGuaranteeTagType strong_guarantee
typename std::aligned_storage< Len, Align >::type aligned_storage_t
TEST(NotificationTest, SanityTest)
exceptions_internal::ExceptionSafetyTestBuilder MakeExceptionSafetyTester()
testing::ThrowingValue<> Thrower
ExceptionSafetyTestBuilder< DefaultFactory< T >, Operation, Contracts... > WithInitialValue(const T &t) const
std::initializer_list< Thrower > ThrowerList