Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/compiled/StringMap.cpp

Issue 29715695: Noissue - get rid of compiler warnings (Closed) Base URL: github.com:adblockplus/adblockpluscore
Patch Set: Created March 6, 2018, 12:26 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/compiled/RegExp.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/compiled/StringMap.cpp
diff --git a/test/compiled/StringMap.cpp b/test/compiled/StringMap.cpp
index 40c648138c89b453e19f9e3781f4a531fa165ea8..f8a4a7b2e34bf1307729b78dc91aedbd35134a06 100644
--- a/test/compiled/StringMap.cpp
+++ b/test/compiled/StringMap.cpp
@@ -29,15 +29,15 @@ void testStringMap()
EXPECT_EQ(map.begin(), map.end());
auto key = u"Foobar"_str;
- EXPECT_EQ(key.length(), 6);
- EXPECT_EQ(map.size(), 0);
+ EXPECT_EQ(6u, key.length());
+ EXPECT_EQ(0u, map.size());
map[u"Foobar"_str] = "one";
- EXPECT_EQ(map.size(), 1);
+ EXPECT_EQ(1u, map.size());
EXPECT_NE(map.begin(), map.end());
map[u""_str] = "null";
- EXPECT_EQ(map.size(), 2);
+ EXPECT_EQ(2u, map.size());
auto entry = map.find(u"Foobar"_str);
EXPECT_TRUE(entry);
@@ -53,7 +53,7 @@ void testStringMap()
entry = map.find(u"Foobar3"_str);
EXPECT_TRUE(entry);
- EXPECT_EQ(map.size(), 4);
+ EXPECT_EQ(4u, map.size());
EXPECT_TRUE(map.erase(u"Foobar2"_str));
// already deleted. Returns false.
@@ -61,12 +61,12 @@ void testStringMap()
// invalid. Returns false.
EXPECT_FALSE(map.erase(u"Foobar42"_str));
- EXPECT_EQ(map.size(), 4);
+ EXPECT_EQ(4u, map.size());
entry = map.find(u"Foobar2"_str);
EXPECT_FALSE(entry);
- int i = 0;
+ uint32_t i = 0;
for (const auto& e : map)
{
EXPECT_FALSE(e.is_invalid());
@@ -75,7 +75,7 @@ void testStringMap()
i++;
}
- EXPECT_EQ(i, 3);
+ EXPECT_EQ(3u, i);
// We did not return deleted entries (there is one).
// So size is different than actual count.
EXPECT_NE(i, map.size());
« no previous file with comments | « test/compiled/RegExp.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld