Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(906)

Unified Diff: base/test/histogram_tester_unittest.cc

Issue 1265403003: Fix HistogramTester::GetAllSamples when empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« base/test/histogram_tester.cc ('K') | « base/test/histogram_tester.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/histogram_tester_unittest.cc
diff --git a/base/test/histogram_tester_unittest.cc b/base/test/histogram_tester_unittest.cc
index 8452013f036c7b125deb9076d0864ca111c0409b..71d68884934e03c0a81ee41a580b65109af000f1 100644
--- a/base/test/histogram_tester_unittest.cc
+++ b/base/test/histogram_tester_unittest.cc
@@ -13,6 +13,7 @@
namespace base {
using ::testing::ElementsAre;
+using ::testing::IsEmpty;
static const char kHistogram1[] = "Test1";
static const char kHistogram2[] = "Test2";
@@ -106,4 +107,9 @@ TEST_F(HistogramTesterTest, TestGetAllSamples) {
ElementsAre(Bucket(2, 1), Bucket(3, 2), Bucket(5, 1)));
}
+TEST_F(HistogramTesterTest, TestGetAllSamples_NoSamples) {
+ HistogramTester tester;
+ EXPECT_THAT(tester.GetAllSamples(kHistogram5), IsEmpty());
+}
+
} // namespace base
« base/test/histogram_tester.cc ('K') | « base/test/histogram_tester.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698