aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2012-05-31 20:40:56 +0000
committerzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2012-05-31 20:40:56 +0000
commit2fd619edd3d1ec053f6276debdb513f1122ebcf3 (patch)
tree3df112696485c11d5d0034d13f604d5f52be0a43 /include
parent79a367eb217fcd47e2beaf8c0f87fe6d5926f739 (diff)
downloadgoogletest-2fd619edd3d1ec053f6276debdb513f1122ebcf3.tar.gz
googletest-2fd619edd3d1ec053f6276debdb513f1122ebcf3.tar.bz2
googletest-2fd619edd3d1ec053f6276debdb513f1122ebcf3.zip
Pulls in gtest r615.
Renames internal enums to the kFoo naming style. Fixes gmock doctor to work with newer versions of Clang.
Diffstat (limited to 'include')
-rw-r--r--include/gmock/gmock-generated-actions.h3
-rw-r--r--include/gmock/gmock-generated-actions.h.pump3
-rw-r--r--include/gmock/gmock-spec-builders.h17
-rw-r--r--include/gmock/internal/gmock-internal-utils.h10
4 files changed, 13 insertions, 20 deletions
diff --git a/include/gmock/gmock-generated-actions.h b/include/gmock/gmock-generated-actions.h
index 3b599b36..2327393d 100644
--- a/include/gmock/gmock-generated-actions.h
+++ b/include/gmock/gmock-generated-actions.h
@@ -2216,9 +2216,6 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
p9##_type>::gmock_Impl<F>::gmock_PerformImpl(\
GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-// TODO(wan@google.com): move the following to a different .h file
-// such that we don't have to run 'pump' every time the code is
-// updated.
namespace testing {
// The ACTION*() macros trigger warning C4100 (unreferenced formal
diff --git a/include/gmock/gmock-generated-actions.h.pump b/include/gmock/gmock-generated-actions.h.pump
index 57a7811a..8e2b5735 100644
--- a/include/gmock/gmock-generated-actions.h.pump
+++ b/include/gmock/gmock-generated-actions.h.pump
@@ -739,9 +739,6 @@ $$ } // This meta comment fixes auto-indentation in Emacs. It won't
$$ // show up in the generated code.
-// TODO(wan@google.com): move the following to a different .h file
-// such that we don't have to run 'pump' every time the code is
-// updated.
namespace testing {
// The ACTION*() macros trigger warning C4100 (unreferenced formal
diff --git a/include/gmock/gmock-spec-builders.h b/include/gmock/gmock-spec-builders.h
index 30721ce6..c677333c 100644
--- a/include/gmock/gmock-spec-builders.h
+++ b/include/gmock/gmock-spec-builders.h
@@ -353,12 +353,11 @@ class OnCallSpec : public UntypedOnCallSpecBase {
Action<F> action_;
}; // class OnCallSpec
-// Possible reactions on uninteresting calls. TODO(wan@google.com):
-// rename the enum values to the kFoo style.
+// Possible reactions on uninteresting calls.
enum CallReaction {
- ALLOW,
- WARN,
- FAIL
+ kAllow,
+ kWarn,
+ kFail
};
} // namespace internal
@@ -422,7 +421,7 @@ class GTEST_API_ Mock {
// Returns the reaction Google Mock will have on uninteresting calls
// made on the given mock object.
static internal::CallReaction GetReactionOnUninterestingCalls(
- const void* mock_obj);
+ const void* mock_obj)
GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
// Verifies that all expectations on the given mock object have been
@@ -1163,7 +1162,7 @@ class TypedExpectation : public ExpectationBase {
<< action_count << " WillOnce()"
<< (action_count == 1 ? " is" : "s are") << " specified - ";
mocker->DescribeDefaultActionTo(args, &ss);
- Log(WARNING, ss.str(), 1);
+ Log(kWarning, ss.str(), 1);
}
return count <= action_count ?
@@ -1251,7 +1250,7 @@ class MockSpec {
// the newly created spec.
internal::OnCallSpec<F>& InternalDefaultActionSetAt(
const char* file, int line, const char* obj, const char* call) {
- LogWithLocation(internal::INFO, file, line,
+ LogWithLocation(internal::kInfo, file, line,
string("ON_CALL(") + obj + ", " + call + ") invoked");
return function_mocker_->AddNewOnCallSpec(file, line, matchers_);
}
@@ -1261,7 +1260,7 @@ class MockSpec {
internal::TypedExpectation<F>& InternalExpectedAt(
const char* file, int line, const char* obj, const char* call) {
const string source_text(string("EXPECT_CALL(") + obj + ", " + call + ")");
- LogWithLocation(internal::INFO, file, line, source_text + " invoked");
+ LogWithLocation(internal::kInfo, file, line, source_text + " invoked");
return function_mocker_->AddNewExpectation(
file, line, source_text, matchers_);
}
diff --git a/include/gmock/internal/gmock-internal-utils.h b/include/gmock/internal/gmock-internal-utils.h
index aef9388e..6b6de970 100644
--- a/include/gmock/internal/gmock-internal-utils.h
+++ b/include/gmock/internal/gmock-internal-utils.h
@@ -260,7 +260,7 @@ class FailureReporterInterface {
public:
// The type of a failure (either non-fatal or fatal).
enum FailureType {
- NONFATAL, FATAL
+ kNonfatal, kFatal
};
virtual ~FailureReporterInterface() {}
@@ -281,7 +281,7 @@ GTEST_API_ FailureReporterInterface* GetFailureReporter();
inline void Assert(bool condition, const char* file, int line,
const string& msg) {
if (!condition) {
- GetFailureReporter()->ReportFailure(FailureReporterInterface::FATAL,
+ GetFailureReporter()->ReportFailure(FailureReporterInterface::kFatal,
file, line, msg);
}
}
@@ -294,7 +294,7 @@ inline void Assert(bool condition, const char* file, int line) {
inline void Expect(bool condition, const char* file, int line,
const string& msg) {
if (!condition) {
- GetFailureReporter()->ReportFailure(FailureReporterInterface::NONFATAL,
+ GetFailureReporter()->ReportFailure(FailureReporterInterface::kNonfatal,
file, line, msg);
}
}
@@ -304,8 +304,8 @@ inline void Expect(bool condition, const char* file, int line) {
// Severity level of a log.
enum LogSeverity {
- INFO = 0,
- WARNING = 1
+ kInfo = 0,
+ kWarning = 1
};
// Valid values for the --gmock_verbose flag.