Address warnings in CDM unittests

[ Merge of http://go/wvgerrit/24600 ]

Test: Unit test only change. Verified by rerunning unittests.

b/36221430

Change-Id: I36a8a0a5df400673689280cbf53ba9394f827c90
This commit is contained in:
Rahul Frias
2017-03-14 12:13:12 -07:00
parent dd88c13fb1
commit 2ec7ec27bb
3 changed files with 11 additions and 11 deletions

View File

@@ -53,7 +53,7 @@ TEST_F(EventMetricTest, NoFieldsSuccessNullCallback) {
metric.Record(10LL);
std::map<std::string, Distribution*> value_map = GetValueMap(metric);
ASSERT_EQ(1, GetValueMap(metric).size());
ASSERT_EQ(1u, GetValueMap(metric).size());
EXPECT_EQ(2, value_map.begin()->second->Count());
EXPECT_EQ("", value_map.begin()->first);
}
@@ -75,7 +75,7 @@ TEST_F(EventMetricTest, NoFieldsSuccessWithCallback) {
metric.Publish(mock_notification_.get());
std::map<std::string, Distribution*> value_map = GetValueMap(metric);
ASSERT_EQ(1, GetValueMap(metric).size());
ASSERT_EQ(1u, GetValueMap(metric).size());
EXPECT_EQ(1, value_map.begin()->second->Count());
EXPECT_EQ("", value_map.begin()->first);
}
@@ -88,7 +88,7 @@ TEST_F(EventMetricTest, OneFieldSuccessNoCallback) {
metric.Record(11LL, 13);
metric.Record(12LL, 13);
std::map<std::string, Distribution*> value_map = GetValueMap(metric);
ASSERT_EQ(2, GetValueMap(metric).size());
ASSERT_EQ(2u, GetValueMap(metric).size());
// Verify both instances.
// TODO(blueeyes): Export MakeFieldNameString so it can be used here.
@@ -113,7 +113,7 @@ TEST_F(EventMetricTest, TwoFieldsSuccess) {
metric.Record(5, 7, 23);
std::map<std::string, Distribution*> value_map = GetValueMap(metric);
ASSERT_EQ(4, GetValueMap(metric).size());
ASSERT_EQ(4u, GetValueMap(metric).size());
// Verify all instances.
Distribution* distribution_7_23 = value_map["{error_code:7&size:23}"];
@@ -172,7 +172,7 @@ TEST_F(EventMetricTest, ThreeFieldsSuccess) {
std::map<std::string, Distribution*> value_map = GetValueMap(metric);
ASSERT_EQ(1, GetValueMap(metric).size());
ASSERT_EQ(1u, GetValueMap(metric).size());
EXPECT_EQ("{error_code:7&size:13&woke up happy:0}",
value_map.begin()->first);
EXPECT_EQ(1, value_map.begin()->second->Count());
@@ -188,7 +188,7 @@ TEST_F(EventMetricTest, FourFieldsSuccess) {
metric.Record(10LL, 7, 13, true, "find your true love");
std::map<std::string, Distribution*> value_map = GetValueMap(metric);
ASSERT_EQ(1, GetValueMap(metric).size());
ASSERT_EQ(1u, GetValueMap(metric).size());
EXPECT_EQ(
"{error_code:7&size:13&woke up happy:1&horoscope:find your true love}",
value_map.begin()->first);