diff options
author | zhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386> | 2011-02-24 07:29:13 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386> | 2011-02-24 07:29:13 +0000 |
commit | 658ac0b71a350cc833ee4520536b6c4964c7b944 (patch) | |
tree | aed1a53191aa46cc85100533862e9590e974f0c5 /test | |
parent | ed6c9277bb12f2808bb812ae8f91492dac9517b4 (diff) | |
download | googletest-658ac0b71a350cc833ee4520536b6c4964c7b944.tar.gz googletest-658ac0b71a350cc833ee4520536b6c4964c7b944.tar.bz2 googletest-658ac0b71a350cc833ee4520536b6c4964c7b944.zip |
Indents preprocessor directives.
Diffstat (limited to 'test')
-rw-r--r-- | test/gmock-generated-actions_test.cc | 6 | ||||
-rw-r--r-- | test/gmock-generated-function-mockers_test.cc | 4 | ||||
-rw-r--r-- | test/gmock-generated-matchers_test.cc | 6 | ||||
-rw-r--r-- | test/gmock-internal-utils_test.cc | 11 | ||||
-rw-r--r-- | test/gmock-spec-builders_test.cc | 19 | ||||
-rw-r--r-- | test/gmock_link_test.h | 8 |
6 files changed, 30 insertions, 24 deletions
diff --git a/test/gmock-generated-actions_test.cc b/test/gmock-generated-actions_test.cc index 982be1b9..436f1a2e 100644 --- a/test/gmock-generated-actions_test.cc +++ b/test/gmock-generated-actions_test.cc @@ -593,8 +593,8 @@ TEST(DoAllTest, TenActions) { // is expanded and macro expansion cannot contain #pragma. Therefore // we suppress them here. #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4100) +# pragma warning(push) +# pragma warning(disable:4100) #endif // Tests the ACTION*() macro family. @@ -1205,7 +1205,7 @@ TEST(ActionTemplateTest, CanBeOverloadedOnNumberOfValueParameters) { } #ifdef _MSC_VER -#pragma warning(pop) +# pragma warning(pop) #endif } // namespace gmock_generated_actions_test diff --git a/test/gmock-generated-function-mockers_test.cc b/test/gmock-generated-function-mockers_test.cc index d000386d..0d90ded7 100644 --- a/test/gmock-generated-function-mockers_test.cc +++ b/test/gmock-generated-function-mockers_test.cc @@ -44,14 +44,14 @@ // MSDN says the header file to be included for STDMETHOD is BaseTyps.h but // we are getting compiler errors if we use basetyps.h, hence including // objbase.h for definition of STDMETHOD. -#include <objbase.h> +# include <objbase.h> #endif // GTEST_OS_WINDOWS // There is a bug in MSVC (fixed in VS 2008) that prevents creating a // mock for a function with const arguments, so we don't test such // cases for MSVC versions older than 2008. #if !GTEST_OS_WINDOWS || (_MSC_VER >= 1500) -#define GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS +# define GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS #endif // !GTEST_OS_WINDOWS || (_MSC_VER >= 1500) namespace testing { diff --git a/test/gmock-generated-matchers_test.cc b/test/gmock-generated-matchers_test.cc index 2a7f498a..5e18471d 100644 --- a/test/gmock-generated-matchers_test.cc +++ b/test/gmock-generated-matchers_test.cc @@ -144,8 +144,8 @@ TEST(ArgsTest, AcceptsDecreasingTemplateArgs) { // is expanded and macro expansion cannot contain #pragma. Therefore // we suppress them here. #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4100) +# pragma warning(push) +# pragma warning(disable:4100) #endif MATCHER(SumIsZero, "") { @@ -1092,7 +1092,7 @@ TEST(ContainsTest, WorksForTwoDimensionalNativeArray) { } #ifdef _MSC_VER -#pragma warning(pop) +# pragma warning(pop) #endif } // namespace diff --git a/test/gmock-internal-utils_test.cc b/test/gmock-internal-utils_test.cc index 5b0e8043..ae743c1c 100644 --- a/test/gmock-internal-utils_test.cc +++ b/test/gmock-internal-utils_test.cc @@ -45,7 +45,7 @@ #include "gtest/gtest-spi.h" #if GTEST_OS_CYGWIN -#include <sys/types.h> // For ssize_t. NOLINT +# include <sys/types.h> // For ssize_t. NOLINT #endif class ProtocolMessage; @@ -416,18 +416,21 @@ TEST(LogTest, NoSkippingStackFrameInOptMode) { CaptureStdout(); Log(WARNING, "Test log.\n", 100); const String log = GetCapturedStdout(); -#if defined(NDEBUG) && GTEST_GOOGLE3_MODE_ + +# if defined(NDEBUG) && GTEST_GOOGLE3_MODE_ + // In opt mode, no stack frame should be skipped. EXPECT_THAT(log, ContainsRegex("\nGMOCK WARNING:\n" "Test log\\.\n" "Stack trace:\n" ".+")); -#else +# else + // In dbg mode, the stack frames should be skipped. EXPECT_STREQ("\nGMOCK WARNING:\n" "Test log.\n" "Stack trace:\n", log.c_str()); -#endif +# endif } // Tests that all logs are printed when the value of the diff --git a/test/gmock-spec-builders_test.cc b/test/gmock-spec-builders_test.cc index aea5228b..29d47d12 100644 --- a/test/gmock-spec-builders_test.cc +++ b/test/gmock-spec-builders_test.cc @@ -1717,14 +1717,14 @@ TEST(DeletingMockEarlyTest, Success2) { // Suppresses warning on unreferenced formal parameter in MSVC with // -W4. #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4100) +# pragma warning(push) +# pragma warning(disable:4100) #endif ACTION_P(Delete, ptr) { delete ptr; } #ifdef _MSC_VER -#pragma warning(pop) +# pragma warning(pop) #endif TEST(DeletingMockEarlyTest, CanDeleteSelfInActionReturningVoid) { @@ -1890,7 +1890,9 @@ TEST(FunctionCallMessageTest, UninterestingCallGeneratesFyiWithStackTrace) { const String output = GetCapturedStdout(); EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", output); EXPECT_PRED_FORMAT2(IsSubstring, "Stack trace:", output); -#ifndef NDEBUG + +# ifndef NDEBUG + // We check the stack trace content in dbg-mode only, as opt-mode // may inline the call we are interested in seeing. @@ -1904,7 +1906,8 @@ TEST(FunctionCallMessageTest, UninterestingCallGeneratesFyiWithStackTrace) { c.NonVoidMethod(); const String output2 = GetCapturedStdout(); EXPECT_PRED_FORMAT2(IsSubstring, "NonVoidMethod(", output2); -#endif // NDEBUG + +# endif // NDEBUG } // Tests that an uninteresting mock function call causes the function @@ -1949,14 +1952,14 @@ class GMockVerboseFlagTest : public VerboseFlagPreservingFixture { const string& function_name) { if (should_print) { EXPECT_THAT(output.c_str(), HasSubstr(expected_substring)); -#ifndef NDEBUG +# ifndef NDEBUG // We check the stack trace content in dbg-mode only, as opt-mode // may inline the call we are interested in seeing. EXPECT_THAT(output.c_str(), HasSubstr(function_name)); -#else +# else // Suppresses 'unused function parameter' warnings. static_cast<void>(function_name); -#endif // NDEBUG +# endif // NDEBUG } else { EXPECT_STREQ("", output.c_str()); } diff --git a/test/gmock_link_test.h b/test/gmock_link_test.h index 499cc186..ab5af4b4 100644 --- a/test/gmock_link_test.h +++ b/test/gmock_link_test.h @@ -117,7 +117,7 @@ #include "gmock/gmock.h" #if !GTEST_OS_WINDOWS_MOBILE -#include <errno.h> +# include <errno.h> #endif #include "gmock/internal/gmock-port.h" @@ -419,8 +419,8 @@ TEST(LinkTest, TestThrow) { // is expanded and macro expansion cannot contain #pragma. Therefore // we suppress them here. #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4100) +# pragma warning(push) +# pragma warning(disable:4100) #endif // Tests the linkage of actions created using ACTION macro. @@ -455,7 +455,7 @@ ACTION_P2(ReturnEqualsEitherOf, first, second) { } #ifdef _MSC_VER -#pragma warning(pop) +# pragma warning(pop) #endif TEST(LinkTest, TestActionP2Macro) { |