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

Unified Diff: test/ReferrerMapping.cpp

Issue 29391770: Noissue - Fix sign comparison warnings in tests. (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created March 22, 2017, 3:32 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/Notification.cpp ('k') | test/WebRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/ReferrerMapping.cpp
===================================================================
--- a/test/ReferrerMapping.cpp
+++ b/test/ReferrerMapping.cpp
@@ -18,27 +18,27 @@
#include <AdblockPlus.h>
#include <gtest/gtest.h>
TEST(ReferrerMappingTest, EmptyReferrerChain)
{
AdblockPlus::ReferrerMapping referrerMapping;
std::vector<std::string> referrerChain =
referrerMapping.BuildReferrerChain("first");
- ASSERT_EQ(1, referrerChain.size());
+ ASSERT_EQ(1u, referrerChain.size());
ASSERT_EQ("first", referrerChain[0]);
}
TEST(ReferrerMappingTest, TwoElementReferrerChain)
{
AdblockPlus::ReferrerMapping referrerMapping;
referrerMapping.Add("second", "first");
std::vector<std::string> referrerChain =
referrerMapping.BuildReferrerChain("second");
- ASSERT_EQ(2, referrerChain.size());
+ ASSERT_EQ(2u, referrerChain.size());
ASSERT_EQ("first", referrerChain[0]);
ASSERT_EQ("second", referrerChain[1]);
}
TEST(ReferrerMappingTest, TenElementReferrerChain)
{
AdblockPlus::ReferrerMapping referrerMapping;
referrerMapping.Add("second", "first");
@@ -47,17 +47,17 @@ TEST(ReferrerMappingTest, TenElementRefe
referrerMapping.Add("fifth", "fourth");
referrerMapping.Add("sixth", "fifth");
referrerMapping.Add("seventh", "sixth");
referrerMapping.Add("eighth", "seventh");
referrerMapping.Add("ninth", "eighth");
referrerMapping.Add("tenth", "ninth");
std::vector<std::string> referrerChain =
referrerMapping.BuildReferrerChain("tenth");
- ASSERT_EQ(10, referrerChain.size());
+ ASSERT_EQ(10u, referrerChain.size());
ASSERT_EQ("first", referrerChain[0]);
ASSERT_EQ("second", referrerChain[1]);
ASSERT_EQ("third", referrerChain[2]);
ASSERT_EQ("fourth", referrerChain[3]);
ASSERT_EQ("fifth", referrerChain[4]);
ASSERT_EQ("sixth", referrerChain[5]);
ASSERT_EQ("seventh", referrerChain[6]);
ASSERT_EQ("eighth", referrerChain[7]);
@@ -71,16 +71,16 @@ TEST(ReferrerMappingTest, CacheOnlyFiveU
referrerMapping.Add("second", "first");
referrerMapping.Add("third", "second");
referrerMapping.Add("fourth", "third");
referrerMapping.Add("fifth", "fourth");
referrerMapping.Add("sixth", "fifth");
referrerMapping.Add("seventh", "sixth");
std::vector<std::string> referrerChain =
referrerMapping.BuildReferrerChain("seventh");
- ASSERT_EQ(6, referrerChain.size());
+ ASSERT_EQ(6u, referrerChain.size());
ASSERT_EQ("second", referrerChain[0]);
ASSERT_EQ("third", referrerChain[1]);
ASSERT_EQ("fourth", referrerChain[2]);
ASSERT_EQ("fifth", referrerChain[3]);
ASSERT_EQ("sixth", referrerChain[4]);
ASSERT_EQ("seventh", referrerChain[5]);
}
« no previous file with comments | « test/Notification.cpp ('k') | test/WebRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld