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 |