You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2013/04/04 22:57:42 UTC
svn commit: r1464748 - in /incubator/mesos/trunk/src/tests:
monitor_tests.cpp reaper_tests.cpp utils.hpp
Author: benh
Date: Thu Apr 4 20:57:41 2013
New Revision: 1464748
URL: http://svn.apache.org/r1464748
Log:
Removed more polluting 'using' directives.
Review: https://reviews.apache.org/r/10257
Modified:
incubator/mesos/trunk/src/tests/monitor_tests.cpp
incubator/mesos/trunk/src/tests/reaper_tests.cpp
incubator/mesos/trunk/src/tests/utils.hpp
Modified: incubator/mesos/trunk/src/tests/monitor_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/monitor_tests.cpp?rev=1464748&r1=1464747&r2=1464748&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/monitor_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/monitor_tests.cpp Thu Apr 4 20:57:41 2013
@@ -49,6 +49,8 @@ using process::http::Response;
using std::string;
+using testing::Return;
+
// TODO(bmahler): Add additional tests:
// 1. Check that the data has been published to statistics.
Modified: incubator/mesos/trunk/src/tests/reaper_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/reaper_tests.cpp?rev=1464748&r1=1464747&r2=1464748&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/reaper_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/reaper_tests.cpp Thu Apr 4 20:57:41 2013
@@ -34,6 +34,7 @@ using namespace mesos::internal;
using namespace mesos::internal::slave;
using namespace mesos::internal::tests;
+using testing::_;
using testing::DoDefault;
Modified: incubator/mesos/trunk/src/tests/utils.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/utils.hpp?rev=1464748&r1=1464747&r2=1464748&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/utils.hpp (original)
+++ incubator/mesos/trunk/src/tests/utils.hpp Thu Apr 4 20:57:41 2013
@@ -71,11 +71,6 @@
#include "tests/flags.hpp"
-// TODO(benh): Kill these since they pollute everything that includes this file.
-using ::testing::_;
-using ::testing::Invoke;
-using ::testing::Return;
-
namespace mesos {
namespace internal {
namespace tests {
@@ -404,6 +399,8 @@ public:
// Spawn the underlying allocator process.
process::spawn(real);
+ using ::testing::_;
+
ON_CALL(*this, initialize(_, _))
.WillByDefault(InvokeInitialize(this));
@@ -887,10 +884,10 @@ private:
.Times(testing::AnyNumber());
EXPECT_CALL(*this, usage(testing::_, testing::_))
- .WillRepeatedly(Return(ResourceStatistics()));
+ .WillRepeatedly(testing::Return(ResourceStatistics()));
EXPECT_CALL(*this, recover(testing::_))
- .WillRepeatedly(Return(Nothing()));
+ .WillRepeatedly(testing::Return(Nothing()));
}
std::map<ExecutorID, Executor*> executors;