Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
658ac0b7
Commit
658ac0b7
authored
Feb 24, 2011
by
zhanyong.wan
Browse files
Indents preprocessor directives.
parent
ed6c9277
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
62 additions
and
55 deletions
+62
-55
include/gmock/gmock-actions.h
include/gmock/gmock-actions.h
+1
-1
include/gmock/gmock-generated-actions.h
include/gmock/gmock-generated-actions.h
+3
-3
include/gmock/gmock-generated-actions.h.pump
include/gmock/gmock-generated-actions.h.pump
+3
-3
include/gmock/gmock-matchers.h
include/gmock/gmock-matchers.h
+3
-3
include/gmock/gmock-more-actions.h
include/gmock/gmock-more-actions.h
+13
-13
include/gmock/gmock-spec-builders.h
include/gmock/gmock-spec-builders.h
+3
-3
include/gmock/internal/gmock-internal-utils.h
include/gmock/internal/gmock-internal-utils.h
+3
-2
include/gmock/internal/gmock-port.h
include/gmock/internal/gmock-port.h
+1
-1
src/gmock-spec-builders.cc
src/gmock-spec-builders.cc
+1
-1
src/gmock_main.cc
src/gmock_main.cc
+1
-1
test/gmock-generated-actions_test.cc
test/gmock-generated-actions_test.cc
+3
-3
test/gmock-generated-function-mockers_test.cc
test/gmock-generated-function-mockers_test.cc
+2
-2
test/gmock-generated-matchers_test.cc
test/gmock-generated-matchers_test.cc
+3
-3
test/gmock-internal-utils_test.cc
test/gmock-internal-utils_test.cc
+7
-4
test/gmock-spec-builders_test.cc
test/gmock-spec-builders_test.cc
+11
-8
test/gmock_link_test.h
test/gmock_link_test.h
+4
-4
No files found.
include/gmock/gmock-actions.h
View file @
658ac0b7
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#include <string>
#include <string>
#ifndef _WIN32_WCE
#ifndef _WIN32_WCE
#include <errno.h>
#
include <errno.h>
#endif
#endif
#include "gmock/internal/gmock-internal-utils.h"
#include "gmock/internal/gmock-internal-utils.h"
...
...
include/gmock/gmock-generated-actions.h
View file @
658ac0b7
...
@@ -2228,8 +2228,8 @@ namespace testing {
...
@@ -2228,8 +2228,8 @@ namespace testing {
// is expanded and macro expansion cannot contain #pragma. Therefore
// is expanded and macro expansion cannot contain #pragma. Therefore
// we suppress them here.
// we suppress them here.
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(push)
#
pragma warning(push)
#pragma warning(disable:4100)
#
pragma warning(disable:4100)
#endif
#endif
// Various overloads for InvokeArgument<N>().
// Various overloads for InvokeArgument<N>().
...
@@ -2411,7 +2411,7 @@ ACTION_TEMPLATE(ReturnNew,
...
@@ -2411,7 +2411,7 @@ ACTION_TEMPLATE(ReturnNew,
}
}
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(pop)
#
pragma warning(pop)
#endif
#endif
}
// namespace testing
}
// namespace testing
...
...
include/gmock/gmock-generated-actions.h.pump
View file @
658ac0b7
...
@@ -751,8 +751,8 @@ namespace testing {
...
@@ -751,8 +751,8 @@ namespace testing {
// is expanded and macro expansion cannot contain #pragma. Therefore
// is expanded and macro expansion cannot contain #pragma. Therefore
// we suppress them here.
// we suppress them here.
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(push)
#
pragma warning(push)
#pragma warning(disable:4100)
#
pragma warning(disable:4100)
#endif
#endif
// Various overloads for InvokeArgument<N>().
// Various overloads for InvokeArgument<N>().
...
@@ -817,7 +817,7 @@ ACTION_TEMPLATE(ReturnNew,
...
@@ -817,7 +817,7 @@ ACTION_TEMPLATE(ReturnNew,
]]
]]
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(pop)
#
pragma warning(pop)
#endif
#endif
}
// namespace testing
}
// namespace testing
...
...
include/gmock/gmock-matchers.h
View file @
658ac0b7
...
@@ -1394,12 +1394,12 @@ class TrulyMatcher {
...
@@ -1394,12 +1394,12 @@ class TrulyMatcher {
MatchResultListener
*
/* listener */
)
const
{
MatchResultListener
*
/* listener */
)
const
{
#if GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS
// MSVC warns about converting a value into bool (warning 4800).
// MSVC warns about converting a value into bool (warning 4800).
#pragma warning(push) // Saves the current warning state.
#
pragma warning(push) // Saves the current warning state.
#pragma warning(disable:4800) // Temporarily disables warning 4800.
#
pragma warning(disable:4800) // Temporarily disables warning 4800.
#endif // GTEST_OS_WINDOWS
#endif // GTEST_OS_WINDOWS
return
predicate_
(
x
);
return
predicate_
(
x
);
#if GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS
#pragma warning(pop) // Restores the warning state.
#
pragma warning(pop) // Restores the warning state.
#endif // GTEST_OS_WINDOWS
#endif // GTEST_OS_WINDOWS
}
}
...
...
include/gmock/gmock-more-actions.h
View file @
658ac0b7
...
@@ -136,8 +136,8 @@ WithArg(const InnerAction& action) {
...
@@ -136,8 +136,8 @@ WithArg(const InnerAction& action) {
// is expanded and macro expansion cannot contain #pragma. Therefore
// is expanded and macro expansion cannot contain #pragma. Therefore
// we suppress them here.
// we suppress them here.
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(push)
#
pragma warning(push)
#pragma warning(disable:4100)
#
pragma warning(disable:4100)
#endif
#endif
// Action ReturnArg<k>() returns the k-th argument of the mock function.
// Action ReturnArg<k>() returns the k-th argument of the mock function.
...
@@ -188,12 +188,12 @@ ACTION_TEMPLATE(SetArrayArgument,
...
@@ -188,12 +188,12 @@ ACTION_TEMPLATE(SetArrayArgument,
// Microsoft compiler deprecates ::std::copy, so we want to suppress warning
// Microsoft compiler deprecates ::std::copy, so we want to suppress warning
// 4996 (Function call with parameters that may be unsafe) there.
// 4996 (Function call with parameters that may be unsafe) there.
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(push) // Saves the current warning state.
#
pragma warning(push) // Saves the current warning state.
#pragma warning(disable:4996) // Temporarily disables warning 4996.
#
pragma warning(disable:4996) // Temporarily disables warning 4996.
#endif
#endif
::
std
::
copy
(
first
,
last
,
::
std
::
tr1
::
get
<
k
>
(
args
));
::
std
::
copy
(
first
,
last
,
::
std
::
tr1
::
get
<
k
>
(
args
));
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(pop) // Restores the warning state.
#
pragma warning(pop) // Restores the warning state.
#endif
#endif
}
}
...
@@ -213,19 +213,19 @@ ACTION_P(ReturnPointee, pointer) { return *pointer; }
...
@@ -213,19 +213,19 @@ ACTION_P(ReturnPointee, pointer) { return *pointer; }
#if GTEST_HAS_EXCEPTIONS
#if GTEST_HAS_EXCEPTIONS
// Suppresses the 'unreachable code' warning that VC generates in opt modes.
// Suppresses the 'unreachable code' warning that VC generates in opt modes.
#ifdef _MSC_VER
#
ifdef _MSC_VER
#pragma warning(push) // Saves the current warning state.
#
pragma warning(push) // Saves the current warning state.
#pragma warning(disable:4702) // Temporarily disables warning 4702.
#
pragma warning(disable:4702) // Temporarily disables warning 4702.
#endif
#
endif
ACTION_P
(
Throw
,
exception
)
{
throw
exception
;
}
ACTION_P
(
Throw
,
exception
)
{
throw
exception
;
}
#ifdef _MSC_VER
#
ifdef _MSC_VER
#pragma warning(pop) // Restores the warning state.
#
pragma warning(pop) // Restores the warning state.
#endif
#
endif
#endif // GTEST_HAS_EXCEPTIONS
#endif // GTEST_HAS_EXCEPTIONS
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(pop)
#
pragma warning(pop)
#endif
#endif
}
// namespace testing
}
// namespace testing
...
...
include/gmock/gmock-spec-builders.h
View file @
658ac0b7
...
@@ -1279,8 +1279,8 @@ class MockSpec {
...
@@ -1279,8 +1279,8 @@ class MockSpec {
// the constructor only.
// the constructor only.
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(push) // Saves the current warning state.
#
pragma warning(push) // Saves the current warning state.
#pragma warning(disable:4355) // Temporarily disables warning 4355.
#
pragma warning(disable:4355) // Temporarily disables warning 4355.
#endif // _MSV_VER
#endif // _MSV_VER
// C++ treats the void type specially. For example, you cannot define
// C++ treats the void type specially. For example, you cannot define
...
@@ -1686,7 +1686,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
...
@@ -1686,7 +1686,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
};
// class FunctionMockerBase
};
// class FunctionMockerBase
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(pop) // Restores the warning state.
#
pragma warning(pop) // Restores the warning state.
#endif // _MSV_VER
#endif // _MSV_VER
// Implements methods of FunctionMockerBase.
// Implements methods of FunctionMockerBase.
...
...
include/gmock/internal/gmock-internal-utils.h
View file @
658ac0b7
...
@@ -101,7 +101,7 @@ struct LinkedPtrLessThan {
...
@@ -101,7 +101,7 @@ struct LinkedPtrLessThan {
(defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED))
(defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED))
// wchar_t is a typedef.
// wchar_t is a typedef.
#else
#else
#define GMOCK_WCHAR_T_IS_NATIVE_ 1
#
define GMOCK_WCHAR_T_IS_NATIVE_ 1
#endif
#endif
// signed wchar_t and unsigned wchar_t are NOT in the C++ standard.
// signed wchar_t and unsigned wchar_t are NOT in the C++ standard.
...
@@ -114,7 +114,8 @@ struct LinkedPtrLessThan {
...
@@ -114,7 +114,8 @@ struct LinkedPtrLessThan {
// To gcc,
// To gcc,
// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
#ifdef __GNUC__
#ifdef __GNUC__
#define GMOCK_HAS_SIGNED_WCHAR_T_ 1 // signed/unsigned wchar_t are valid types.
// signed/unsigned wchar_t are valid types.
# define GMOCK_HAS_SIGNED_WCHAR_T_ 1
#endif
#endif
// In what follows, we use the term "kind" to indicate whether a type
// In what follows, we use the term "kind" to indicate whether a type
...
...
include/gmock/internal/gmock-port.h
View file @
658ac0b7
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
// For MS Visual C++, check the compiler version. At least VS 2003 is
// For MS Visual C++, check the compiler version. At least VS 2003 is
// required to compile Google Mock.
// required to compile Google Mock.
#if defined(_MSC_VER) && _MSC_VER < 1310
#if defined(_MSC_VER) && _MSC_VER < 1310
#error "At least Visual C++ 2003 (7.1) is required to compile Google Mock."
#
error "At least Visual C++ 2003 (7.1) is required to compile Google Mock."
#endif
#endif
// Macro for referencing flags. This is public as we want the user to
// Macro for referencing flags. This is public as we want the user to
...
...
src/gmock-spec-builders.cc
View file @
658ac0b7
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
#include "gtest/gtest.h"
#include "gtest/gtest.h"
#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC
#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC
#include <unistd.h> // NOLINT
#
include <unistd.h> // NOLINT
#endif
#endif
namespace
testing
{
namespace
testing
{
...
...
src/gmock_main.cc
View file @
658ac0b7
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
// Windows. See the following link to track the current status of this bug:
// Windows. See the following link to track the current status of this bug:
// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=394464 // NOLINT
// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=394464 // NOLINT
#if GTEST_OS_WINDOWS_MOBILE
#if GTEST_OS_WINDOWS_MOBILE
#include <tchar.h> // NOLINT
#
include <tchar.h> // NOLINT
int
_tmain
(
int
argc
,
TCHAR
**
argv
)
{
int
_tmain
(
int
argc
,
TCHAR
**
argv
)
{
#else
#else
...
...
test/gmock-generated-actions_test.cc
View file @
658ac0b7
...
@@ -593,8 +593,8 @@ TEST(DoAllTest, TenActions) {
...
@@ -593,8 +593,8 @@ TEST(DoAllTest, TenActions) {
// is expanded and macro expansion cannot contain #pragma. Therefore
// is expanded and macro expansion cannot contain #pragma. Therefore
// we suppress them here.
// we suppress them here.
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(push)
#
pragma warning(push)
#pragma warning(disable:4100)
#
pragma warning(disable:4100)
#endif
#endif
// Tests the ACTION*() macro family.
// Tests the ACTION*() macro family.
...
@@ -1205,7 +1205,7 @@ TEST(ActionTemplateTest, CanBeOverloadedOnNumberOfValueParameters) {
...
@@ -1205,7 +1205,7 @@ TEST(ActionTemplateTest, CanBeOverloadedOnNumberOfValueParameters) {
}
}
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(pop)
#
pragma warning(pop)
#endif
#endif
}
// namespace gmock_generated_actions_test
}
// namespace gmock_generated_actions_test
...
...
test/gmock-generated-function-mockers_test.cc
View file @
658ac0b7
...
@@ -44,14 +44,14 @@
...
@@ -44,14 +44,14 @@
// MSDN says the header file to be included for STDMETHOD is BaseTyps.h but
// 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
// we are getting compiler errors if we use basetyps.h, hence including
// objbase.h for definition of STDMETHOD.
// objbase.h for definition of STDMETHOD.
#include <objbase.h>
#
include <objbase.h>
#endif // GTEST_OS_WINDOWS
#endif // GTEST_OS_WINDOWS
// There is a bug in MSVC (fixed in VS 2008) that prevents creating a
// 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
// mock for a function with const arguments, so we don't test such
// cases for MSVC versions older than 2008.
// cases for MSVC versions older than 2008.
#if !GTEST_OS_WINDOWS || (_MSC_VER >= 1500)
#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)
#endif // !GTEST_OS_WINDOWS || (_MSC_VER >= 1500)
namespace
testing
{
namespace
testing
{
...
...
test/gmock-generated-matchers_test.cc
View file @
658ac0b7
...
@@ -144,8 +144,8 @@ TEST(ArgsTest, AcceptsDecreasingTemplateArgs) {
...
@@ -144,8 +144,8 @@ TEST(ArgsTest, AcceptsDecreasingTemplateArgs) {
// is expanded and macro expansion cannot contain #pragma. Therefore
// is expanded and macro expansion cannot contain #pragma. Therefore
// we suppress them here.
// we suppress them here.
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(push)
#
pragma warning(push)
#pragma warning(disable:4100)
#
pragma warning(disable:4100)
#endif
#endif
MATCHER
(
SumIsZero
,
""
)
{
MATCHER
(
SumIsZero
,
""
)
{
...
@@ -1092,7 +1092,7 @@ TEST(ContainsTest, WorksForTwoDimensionalNativeArray) {
...
@@ -1092,7 +1092,7 @@ TEST(ContainsTest, WorksForTwoDimensionalNativeArray) {
}
}
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(pop)
#
pragma warning(pop)
#endif
#endif
}
// namespace
}
// namespace
test/gmock-internal-utils_test.cc
View file @
658ac0b7
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
#include "gtest/gtest-spi.h"
#include "gtest/gtest-spi.h"
#if GTEST_OS_CYGWIN
#if GTEST_OS_CYGWIN
#include <sys/types.h> // For ssize_t. NOLINT
#
include <sys/types.h> // For ssize_t. NOLINT
#endif
#endif
class
ProtocolMessage
;
class
ProtocolMessage
;
...
@@ -416,18 +416,21 @@ TEST(LogTest, NoSkippingStackFrameInOptMode) {
...
@@ -416,18 +416,21 @@ TEST(LogTest, NoSkippingStackFrameInOptMode) {
CaptureStdout
();
CaptureStdout
();
Log
(
WARNING
,
"Test log.
\n
"
,
100
);
Log
(
WARNING
,
"Test log.
\n
"
,
100
);
const
String
log
=
GetCapturedStdout
();
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.
// In opt mode, no stack frame should be skipped.
EXPECT_THAT
(
log
,
ContainsRegex
(
"
\n
GMOCK WARNING:
\n
"
EXPECT_THAT
(
log
,
ContainsRegex
(
"
\n
GMOCK WARNING:
\n
"
"Test log
\\
.
\n
"
"Test log
\\
.
\n
"
"Stack trace:
\n
"
"Stack trace:
\n
"
".+"
));
".+"
));
#else
# else
// In dbg mode, the stack frames should be skipped.
// In dbg mode, the stack frames should be skipped.
EXPECT_STREQ
(
"
\n
GMOCK WARNING:
\n
"
EXPECT_STREQ
(
"
\n
GMOCK WARNING:
\n
"
"Test log.
\n
"
"Test log.
\n
"
"Stack trace:
\n
"
,
log
.
c_str
());
"Stack trace:
\n
"
,
log
.
c_str
());
#endif
#
endif
}
}
// Tests that all logs are printed when the value of the
// Tests that all logs are printed when the value of the
...
...
test/gmock-spec-builders_test.cc
View file @
658ac0b7
...
@@ -1717,14 +1717,14 @@ TEST(DeletingMockEarlyTest, Success2) {
...
@@ -1717,14 +1717,14 @@ TEST(DeletingMockEarlyTest, Success2) {
// Suppresses warning on unreferenced formal parameter in MSVC with
// Suppresses warning on unreferenced formal parameter in MSVC with
// -W4.
// -W4.
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(push)
#
pragma warning(push)
#pragma warning(disable:4100)
#
pragma warning(disable:4100)
#endif
#endif
ACTION_P
(
Delete
,
ptr
)
{
delete
ptr
;
}
ACTION_P
(
Delete
,
ptr
)
{
delete
ptr
;
}
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(pop)
#
pragma warning(pop)
#endif
#endif
TEST
(
DeletingMockEarlyTest
,
CanDeleteSelfInActionReturningVoid
)
{
TEST
(
DeletingMockEarlyTest
,
CanDeleteSelfInActionReturningVoid
)
{
...
@@ -1890,7 +1890,9 @@ TEST(FunctionCallMessageTest, UninterestingCallGeneratesFyiWithStackTrace) {
...
@@ -1890,7 +1890,9 @@ TEST(FunctionCallMessageTest, UninterestingCallGeneratesFyiWithStackTrace) {
const
String
output
=
GetCapturedStdout
();
const
String
output
=
GetCapturedStdout
();
EXPECT_PRED_FORMAT2
(
IsSubstring
,
"GMOCK WARNING"
,
output
);
EXPECT_PRED_FORMAT2
(
IsSubstring
,
"GMOCK WARNING"
,
output
);
EXPECT_PRED_FORMAT2
(
IsSubstring
,
"Stack trace:"
,
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
// We check the stack trace content in dbg-mode only, as opt-mode
// may inline the call we are interested in seeing.
// may inline the call we are interested in seeing.
...
@@ -1904,7 +1906,8 @@ TEST(FunctionCallMessageTest, UninterestingCallGeneratesFyiWithStackTrace) {
...
@@ -1904,7 +1906,8 @@ TEST(FunctionCallMessageTest, UninterestingCallGeneratesFyiWithStackTrace) {
c
.
NonVoidMethod
();
c
.
NonVoidMethod
();
const
String
output2
=
GetCapturedStdout
();
const
String
output2
=
GetCapturedStdout
();
EXPECT_PRED_FORMAT2
(
IsSubstring
,
"NonVoidMethod("
,
output2
);
EXPECT_PRED_FORMAT2
(
IsSubstring
,
"NonVoidMethod("
,
output2
);
#endif // NDEBUG
# endif // NDEBUG
}
}
// Tests that an uninteresting mock function call causes the function
// Tests that an uninteresting mock function call causes the function
...
@@ -1949,14 +1952,14 @@ class GMockVerboseFlagTest : public VerboseFlagPreservingFixture {
...
@@ -1949,14 +1952,14 @@ class GMockVerboseFlagTest : public VerboseFlagPreservingFixture {
const
string
&
function_name
)
{
const
string
&
function_name
)
{
if
(
should_print
)
{
if
(
should_print
)
{
EXPECT_THAT
(
output
.
c_str
(),
HasSubstr
(
expected_substring
));
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
// We check the stack trace content in dbg-mode only, as opt-mode
// may inline the call we are interested in seeing.
// may inline the call we are interested in seeing.
EXPECT_THAT
(
output
.
c_str
(),
HasSubstr
(
function_name
));
EXPECT_THAT
(
output
.
c_str
(),
HasSubstr
(
function_name
));
#else
#
else
// Suppresses 'unused function parameter' warnings.
// Suppresses 'unused function parameter' warnings.
static_cast
<
void
>
(
function_name
);
static_cast
<
void
>
(
function_name
);
#endif // NDEBUG
#
endif // NDEBUG
}
else
{
}
else
{
EXPECT_STREQ
(
""
,
output
.
c_str
());
EXPECT_STREQ
(
""
,
output
.
c_str
());
}
}
...
...
test/gmock_link_test.h
View file @
658ac0b7
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
#include "gmock/gmock.h"
#include "gmock/gmock.h"
#if !GTEST_OS_WINDOWS_MOBILE
#if !GTEST_OS_WINDOWS_MOBILE
#include <errno.h>
#
include <errno.h>
#endif
#endif
#include "gmock/internal/gmock-port.h"
#include "gmock/internal/gmock-port.h"
...
@@ -419,8 +419,8 @@ TEST(LinkTest, TestThrow) {
...
@@ -419,8 +419,8 @@ TEST(LinkTest, TestThrow) {
// is expanded and macro expansion cannot contain #pragma. Therefore
// is expanded and macro expansion cannot contain #pragma. Therefore
// we suppress them here.
// we suppress them here.
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(push)
#
pragma warning(push)
#pragma warning(disable:4100)
#
pragma warning(disable:4100)
#endif
#endif
// Tests the linkage of actions created using ACTION macro.
// Tests the linkage of actions created using ACTION macro.
...
@@ -455,7 +455,7 @@ ACTION_P2(ReturnEqualsEitherOf, first, second) {
...
@@ -455,7 +455,7 @@ ACTION_P2(ReturnEqualsEitherOf, first, second) {
}
}
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(pop)
#
pragma warning(pop)
#endif
#endif
TEST
(
LinkTest
,
TestActionP2Macro
)
{
TEST
(
LinkTest
,
TestActionP2Macro
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment