mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bmah...@apache.org
Subject [4/7] mesos git commit: Minor cleanup in perf_tests.cpp.
Date Tue, 15 Sep 2015 00:26:51 GMT
Minor cleanup in perf_tests.cpp.

Review: https://reviews.apache.org/r/38378


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c647342c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c647342c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c647342c

Branch: refs/heads/master
Commit: c647342c502e6e29ac0f306d0e0705c31fdecbcc
Parents: 3949de2
Author: Benjamin Mahler <benjamin.mahler@gmail.com>
Authored: Mon Sep 14 13:13:46 2015 -0700
Committer: Benjamin Mahler <benjamin.mahler@gmail.com>
Committed: Mon Sep 14 16:56:20 2015 -0700

----------------------------------------------------------------------
 src/tests/containerizer/perf_tests.cpp | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c647342c/src/tests/containerizer/perf_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/perf_tests.cpp b/src/tests/containerizer/perf_tests.cpp
index bef475e..9fceaa6 100644
--- a/src/tests/containerizer/perf_tests.cpp
+++ b/src/tests/containerizer/perf_tests.cpp
@@ -44,16 +44,11 @@ class PerfTest : public ::testing::Test {};
 
 TEST_F(PerfTest, ROOT_Events)
 {
-  set<string> events;
-
   // Valid events.
-  events.insert("cycles");
-  events.insert("task-clock");
-  EXPECT_TRUE(perf::valid(events));
+  EXPECT_TRUE(perf::valid({"cycles", "task-clock"}));
 
-  // Add an invalid event.
-  events.insert("this-is-an-invalid-event");
-  EXPECT_FALSE(perf::valid(events));
+  // Invalid event among valid events.
+  EXPECT_FALSE(perf::valid({"cycles", "task-clock", "invalid-event"}));
 }
 
 


Mime
View raw message