Pass the -Wmissing-declarations warning.

This makes it easier to use GTest in projects that build with the
-Wmissing-declarations warning. This fixes the warning in headers and
source files, though not GTest's own tests as it is rather noisy there.
This commit is contained in:
David Benjamin
2017-02-10 19:19:54 -05:00
parent ba6ecedede
commit b3d9be5c1d
8 changed files with 55 additions and 47 deletions

View File

@@ -3615,6 +3615,10 @@ BoundSecondMatcher<Tuple2Matcher, Second> MatcherBindSecond(
return BoundSecondMatcher<Tuple2Matcher, Second>(tm, second);
}
// Joins a vector of strings as if they are fields of a tuple; returns
// the joined string. This function is exported for testing.
GTEST_API_ string JoinAsTuple(const Strings& fields);
// Returns the description for a matcher defined using the MATCHER*()
// macro where the user-supplied description string is "", if
// 'negation' is false; otherwise returns the description of the

View File

@@ -508,7 +508,7 @@ bool UntypedFunctionMockerBase::VerifyAndClearExpectationsLocked()
return expectations_met;
}
CallReaction intToCallReaction(int mock_behavior) {
static CallReaction intToCallReaction(int mock_behavior) {
if (mock_behavior >= kAllow && mock_behavior <= kFail) {
return static_cast<internal::CallReaction>(mock_behavior);
}

View File

@@ -65,10 +65,6 @@
namespace testing {
namespace internal {
GTEST_API_ string JoinAsTuple(const Strings& fields);
} // namespace internal
namespace gmock_matchers_test {
using std::greater;