deps: update googletest to 5a37b51 · nodejs/node@c1d3e55 · GitHub
Skip to content

Commit c1d3e55

Browse files
nodejs-github-bottargos
authored andcommitted
deps: update googletest to 5a37b51
PR-URL: #51657 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 69959d0 commit c1d3e55

4 files changed

Lines changed: 97 additions & 72 deletions

File tree

deps/googletest/include/gtest/gtest-param-test.h

Lines changed: 3 additions & 3 deletions

deps/googletest/include/gtest/gtest-typed-test.h

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -194,33 +194,34 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
194194
typedef ::testing::internal::NameGeneratorSelector<__VA_ARGS__>::type \
195195
GTEST_NAME_GENERATOR_(CaseName)
196196

197-
#define TYPED_TEST(CaseName, TestName) \
198-
static_assert(sizeof(GTEST_STRINGIFY_(TestName)) > 1, \
199-
"test-name must not be empty"); \
200-
template <typename gtest_TypeParam_> \
201-
class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \
202-
: public CaseName<gtest_TypeParam_> { \
203-
private: \
204-
typedef CaseName<gtest_TypeParam_> TestFixture; \
205-
typedef gtest_TypeParam_ TypeParam; \
206-
void TestBody() override; \
207-
}; \
208-
static bool gtest_##CaseName##_##TestName##_registered_ \
209-
GTEST_ATTRIBUTE_UNUSED_ = ::testing::internal::TypeParameterizedTest< \
210-
CaseName, \
211-
::testing::internal::TemplateSel<GTEST_TEST_CLASS_NAME_(CaseName, \
212-
TestName)>, \
213-
GTEST_TYPE_PARAMS_( \
214-
CaseName)>::Register("", \
215-
::testing::internal::CodeLocation( \
216-
__FILE__, __LINE__), \
217-
GTEST_STRINGIFY_(CaseName), \
218-
GTEST_STRINGIFY_(TestName), 0, \
219-
::testing::internal::GenerateNames< \
220-
GTEST_NAME_GENERATOR_(CaseName), \
221-
GTEST_TYPE_PARAMS_(CaseName)>()); \
222-
template <typename gtest_TypeParam_> \
223-
void GTEST_TEST_CLASS_NAME_(CaseName, \
197+
#define TYPED_TEST(CaseName, TestName) \
198+
static_assert(sizeof(GTEST_STRINGIFY_(TestName)) > 1, \
199+
"test-name must not be empty"); \
200+
template <typename gtest_TypeParam_> \
201+
class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \
202+
: public CaseName<gtest_TypeParam_> { \
203+
private: \
204+
typedef CaseName<gtest_TypeParam_> TestFixture; \
205+
typedef gtest_TypeParam_ TypeParam; \
206+
void TestBody() override; \
207+
}; \
208+
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static bool \
209+
gtest_##CaseName##_##TestName##_registered_ = \
210+
::testing::internal::TypeParameterizedTest< \
211+
CaseName, \
212+
::testing::internal::TemplateSel<GTEST_TEST_CLASS_NAME_( \
213+
CaseName, TestName)>, \
214+
GTEST_TYPE_PARAMS_( \
215+
CaseName)>::Register("", \
216+
::testing::internal::CodeLocation( \
217+
__FILE__, __LINE__), \
218+
GTEST_STRINGIFY_(CaseName), \
219+
GTEST_STRINGIFY_(TestName), 0, \
220+
::testing::internal::GenerateNames< \
221+
GTEST_NAME_GENERATOR_(CaseName), \
222+
GTEST_TYPE_PARAMS_(CaseName)>()); \
223+
template <typename gtest_TypeParam_> \
224+
void GTEST_TEST_CLASS_NAME_(CaseName, \
224225
TestName)<gtest_TypeParam_>::TestBody()
225226

226227
// Legacy API is deprecated but still available
@@ -267,31 +268,32 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
267268
TYPED_TEST_SUITE_P
268269
#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
269270

270-
#define TYPED_TEST_P(SuiteName, TestName) \
271-
namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \
272-
template <typename gtest_TypeParam_> \
273-
class TestName : public SuiteName<gtest_TypeParam_> { \
274-
private: \
275-
typedef SuiteName<gtest_TypeParam_> TestFixture; \
276-
typedef gtest_TypeParam_ TypeParam; \
277-
void TestBody() override; \
278-
}; \
279-
static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \
280-
GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName( \
281-
__FILE__, __LINE__, GTEST_STRINGIFY_(SuiteName), \
282-
GTEST_STRINGIFY_(TestName)); \
283-
} \
284-
template <typename gtest_TypeParam_> \
285-
void GTEST_SUITE_NAMESPACE_( \
271+
#define TYPED_TEST_P(SuiteName, TestName) \
272+
namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \
273+
template <typename gtest_TypeParam_> \
274+
class TestName : public SuiteName<gtest_TypeParam_> { \
275+
private: \
276+
typedef SuiteName<gtest_TypeParam_> TestFixture; \
277+
typedef gtest_TypeParam_ TypeParam; \
278+
void TestBody() override; \
279+
}; \
280+
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static bool \
281+
gtest_##TestName##_defined_ = \
282+
GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName( \
283+
__FILE__, __LINE__, GTEST_STRINGIFY_(SuiteName), \
284+
GTEST_STRINGIFY_(TestName)); \
285+
} \
286+
template <typename gtest_TypeParam_> \
287+
void GTEST_SUITE_NAMESPACE_( \
286288
SuiteName)::TestName<gtest_TypeParam_>::TestBody()
287289

288290
// Note: this won't work correctly if the trailing arguments are macros.
289291
#define REGISTER_TYPED_TEST_SUITE_P(SuiteName, ...) \
290292
namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \
291293
typedef ::testing::internal::Templates<__VA_ARGS__> gtest_AllTests_; \
292294
} \
293-
static const char* const GTEST_REGISTERED_TEST_NAMES_( \
294-
SuiteName) GTEST_ATTRIBUTE_UNUSED_ = \
295+
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static const char* const \
296+
GTEST_REGISTERED_TEST_NAMES_(SuiteName) = \
295297
GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).VerifyRegisteredTestNames( \
296298
GTEST_STRINGIFY_(SuiteName), __FILE__, __LINE__, #__VA_ARGS__)
297299

@@ -303,22 +305,24 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
303305
REGISTER_TYPED_TEST_SUITE_P
304306
#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
305307

306-
#define INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, SuiteName, Types, ...) \
307-
static_assert(sizeof(GTEST_STRINGIFY_(Prefix)) > 1, \
308-
"test-suit-prefix must not be empty"); \
309-
static bool gtest_##Prefix##_##SuiteName GTEST_ATTRIBUTE_UNUSED_ = \
310-
::testing::internal::TypeParameterizedTestSuite< \
311-
SuiteName, GTEST_SUITE_NAMESPACE_(SuiteName)::gtest_AllTests_, \
312-
::testing::internal::GenerateTypeList<Types>::type>:: \
313-
Register(GTEST_STRINGIFY_(Prefix), \
314-
::testing::internal::CodeLocation(__FILE__, __LINE__), \
315-
&GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName), \
316-
GTEST_STRINGIFY_(SuiteName), \
317-
GTEST_REGISTERED_TEST_NAMES_(SuiteName), \
318-
::testing::internal::GenerateNames< \
319-
::testing::internal::NameGeneratorSelector< \
320-
__VA_ARGS__>::type, \
321-
::testing::internal::GenerateTypeList<Types>::type>())
308+
#define INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, SuiteName, Types, ...) \
309+
static_assert(sizeof(GTEST_STRINGIFY_(Prefix)) > 1, \
310+
"test-suit-prefix must not be empty"); \
311+
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static bool \
312+
gtest_##Prefix##_##SuiteName = \
313+
::testing::internal::TypeParameterizedTestSuite< \
314+
SuiteName, GTEST_SUITE_NAMESPACE_(SuiteName)::gtest_AllTests_, \
315+
::testing::internal::GenerateTypeList<Types>::type>:: \
316+
Register( \
317+
GTEST_STRINGIFY_(Prefix), \
318+
::testing::internal::CodeLocation(__FILE__, __LINE__), \
319+
&GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName), \
320+
GTEST_STRINGIFY_(SuiteName), \
321+
GTEST_REGISTERED_TEST_NAMES_(SuiteName), \
322+
::testing::internal::GenerateNames< \
323+
::testing::internal::NameGeneratorSelector< \
324+
__VA_ARGS__>::type, \
325+
::testing::internal::GenerateTypeList<Types>::type>())
322326

323327
// Legacy API is deprecated but still available
324328
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_

deps/googletest/include/gtest/internal/gtest-internal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,8 @@ class NeverThrown {
15011501
\
15021502
private: \
15031503
void TestBody() override; \
1504-
static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
1504+
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const \
1505+
test_info_; \
15051506
}; \
15061507
\
15071508
::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_suite_name, \

deps/googletest/include/gtest/internal/gtest-port.h

Lines changed: 27 additions & 7 deletions

0 commit comments

Comments
 (0)