diff options
author | Tom Hughes <tomhughes@google.com> | 2023-01-24 19:09:35 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-01-24 19:10:09 (GMT) |
commit | 2491710524094dc3b77cfa4e8eda2ba8edb0d91c (patch) | |
tree | 2c9bdfb14ae930e22a89dcbee3ae97f93a26451a /googletest/include | |
parent | 408471e20cfaa7ccd585fe5e1c6e7b6fba8ce06e (diff) | |
download | googletest-2491710524094dc3b77cfa4e8eda2ba8edb0d91c.zip googletest-2491710524094dc3b77cfa4e8eda2ba8edb0d91c.tar.gz googletest-2491710524094dc3b77cfa4e8eda2ba8edb0d91c.tar.bz2 |
Fix formatting of C++ files
PiperOrigin-RevId: 504325204
Change-Id: Iaa1d6d0ab1dccaaeef26f9cb109d530835499240
Diffstat (limited to 'googletest/include')
-rw-r--r-- | googletest/include/gtest/gtest-param-test.h | 3 | ||||
-rw-r--r-- | googletest/include/gtest/gtest-typed-test.h | 34 | ||||
-rw-r--r-- | googletest/include/gtest/gtest.h | 4 | ||||
-rw-r--r-- | googletest/include/gtest/internal/gtest-param-util.h | 2 | ||||
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 2 |
5 files changed, 23 insertions, 22 deletions
diff --git a/googletest/include/gtest/gtest-param-test.h b/googletest/include/gtest/gtest-param-test.h index 1adb9a7..49a47ea 100644 --- a/googletest/include/gtest/gtest-param-test.h +++ b/googletest/include/gtest/gtest-param-test.h @@ -449,7 +449,8 @@ internal::ParamConverterGenerator<T> ConvertGenerator( #define TEST_P(test_suite_name, test_name) \ class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \ - : public test_suite_name, private ::testing::internal::GTestNonCopyable {\ + : public test_suite_name, \ + private ::testing::internal::GTestNonCopyable { \ public: \ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {} \ void TestBody() override; \ diff --git a/googletest/include/gtest/gtest-typed-test.h b/googletest/include/gtest/gtest-typed-test.h index bd35a32..72de536 100644 --- a/googletest/include/gtest/gtest-typed-test.h +++ b/googletest/include/gtest/gtest-typed-test.h @@ -267,28 +267,28 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes); TYPED_TEST_SUITE_P #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ -#define TYPED_TEST_P(SuiteName, TestName) \ - namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \ - template <typename gtest_TypeParam_> \ - class TestName : public SuiteName<gtest_TypeParam_> { \ - private: \ - typedef SuiteName<gtest_TypeParam_> TestFixture; \ - typedef gtest_TypeParam_ TypeParam; \ - void TestBody() override; \ - }; \ - static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \ - GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName( \ - __FILE__, __LINE__, GTEST_STRINGIFY_(SuiteName), \ - GTEST_STRINGIFY_(TestName)); \ - } \ - template <typename gtest_TypeParam_> \ - void GTEST_SUITE_NAMESPACE_( \ +#define TYPED_TEST_P(SuiteName, TestName) \ + namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \ + template <typename gtest_TypeParam_> \ + class TestName : public SuiteName<gtest_TypeParam_> { \ + private: \ + typedef SuiteName<gtest_TypeParam_> TestFixture; \ + typedef gtest_TypeParam_ TypeParam; \ + void TestBody() override; \ + }; \ + static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \ + GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName( \ + __FILE__, __LINE__, GTEST_STRINGIFY_(SuiteName), \ + GTEST_STRINGIFY_(TestName)); \ + } \ + template <typename gtest_TypeParam_> \ + void GTEST_SUITE_NAMESPACE_( \ SuiteName)::TestName<gtest_TypeParam_>::TestBody() // Note: this won't work correctly if the trailing arguments are macros. #define REGISTER_TYPED_TEST_SUITE_P(SuiteName, ...) \ namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \ - typedef ::testing::internal::Templates<__VA_ARGS__> gtest_AllTests_; \ + typedef ::testing::internal::Templates<__VA_ARGS__> gtest_AllTests_; \ } \ static const char* const GTEST_REGISTERED_TEST_NAMES_( \ SuiteName) GTEST_ATTRIBUTE_UNUSED_ = \ diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 3e452a5..c4e01ad 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -201,8 +201,8 @@ std::set<std::string>* GetIgnoredParameterizedTestSuites(); class GTestNonCopyable { public: GTestNonCopyable() = default; - GTestNonCopyable(const GTestNonCopyable &) = delete; - GTestNonCopyable &operator=(const GTestNonCopyable &) = delete; + GTestNonCopyable(const GTestNonCopyable&) = delete; + GTestNonCopyable& operator=(const GTestNonCopyable&) = delete; ~GTestNonCopyable() = default; }; diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h index 7092d10..358ef72 100644 --- a/googletest/include/gtest/internal/gtest-param-util.h +++ b/googletest/include/gtest/internal/gtest-param-util.h @@ -956,7 +956,7 @@ class CartesianProductHolder { template <typename From, typename To> class ParamGeneratorConverter : public ParamGeneratorInterface<To> { public: - ParamGeneratorConverter(ParamGenerator<From> gen) // NOLINT + ParamGeneratorConverter(ParamGenerator<From> gen) // NOLINT : generator_(std::move(gen)) {} ParamIteratorInterface<To>* Begin() const override { diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 6db191b..b4fa3f0 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -712,7 +712,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; #define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \ __attribute__((format(__MINGW_PRINTF_FORMAT, string_index, first_to_check))) #elif GTEST_HAVE_ATTRIBUTE_(format) -#define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \ +#define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \ __attribute__((format(printf, string_index, first_to_check))) #else #define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) |