summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview_embeddertest.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-05-16 13:53:42 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-16 13:53:42 -0700
commit3cc01f2ba255f4b7584668ee2b8e5ed97792c26d (patch)
tree6a207d8910696ef1c28ef60a855ae266f81067cd /fpdfsdk/fpdfview_embeddertest.cpp
parentc6450bb06b69528406a2a261c70c4ea769965a8d (diff)
downloadpdfium-3cc01f2ba255f4b7584668ee2b8e5ed97792c26d.tar.xz
Fix the code that causes warnings
These are the left or newly added code which causes compilation warnings of "signed and unsigned comparison". Need to fix them before I re-enable the warning flag. BUG=pdfium:29 Review-Url: https://codereview.chromium.org/1986533002
Diffstat (limited to 'fpdfsdk/fpdfview_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfview_embeddertest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfview_embeddertest.cpp b/fpdfsdk/fpdfview_embeddertest.cpp
index 2ccbfd00d3..80b39b5b9c 100644
--- a/fpdfsdk/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/fpdfview_embeddertest.cpp
@@ -56,7 +56,7 @@ TEST_F(FPDFViewEmbeddertest, EmptyDocument) {
EXPECT_EQ(1, FPDF_VIEWERREF_GetNumCopies(document()));
EXPECT_EQ(DuplexUndefined, FPDF_VIEWERREF_GetDuplex(document()));
- EXPECT_EQ(0, FPDF_CountNamedDests(document()));
+ EXPECT_EQ(0u, FPDF_CountNamedDests(document()));
}
TEST_F(FPDFViewEmbeddertest, Page) {
@@ -86,7 +86,7 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = 2000000; // Absurdly large, check not used for this case.
dest = FPDF_GetNamedDest(document(), 0, nullptr, &buffer_size);
EXPECT_NE(nullptr, dest);
- EXPECT_EQ(12u, buffer_size);
+ EXPECT_EQ(12, buffer_size);
// Try to retrieve the first item with too small a buffer.
buffer_size = 10;
@@ -99,7 +99,7 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = 12;
dest = FPDF_GetNamedDest(document(), 0, fixed_buffer, &buffer_size);
EXPECT_NE(nullptr, dest);
- EXPECT_EQ(12u, buffer_size);
+ EXPECT_EQ(12, buffer_size);
EXPECT_EQ(std::string("F\0i\0r\0s\0t\0\0\0", 12),
std::string(fixed_buffer, buffer_size));
@@ -108,7 +108,7 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), 1, fixed_buffer, &buffer_size);
EXPECT_NE(nullptr, dest);
- EXPECT_EQ(10u, buffer_size);
+ EXPECT_EQ(10, buffer_size);
EXPECT_EQ(std::string("N\0e\0x\0t\0\0\0", 10),
std::string(fixed_buffer, buffer_size));
@@ -134,7 +134,7 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), 4, fixed_buffer, &buffer_size);
EXPECT_NE(nullptr, dest);
- EXPECT_EQ(30u, buffer_size);
+ EXPECT_EQ(30, buffer_size);
EXPECT_EQ(std::string("F\0i\0r\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0\0\0", 30),
std::string(fixed_buffer, buffer_size));
@@ -144,7 +144,7 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), 5, fixed_buffer, &buffer_size);
EXPECT_NE(nullptr, dest);
- EXPECT_EQ(28u, buffer_size);
+ EXPECT_EQ(28, buffer_size);
EXPECT_EQ(std::string("L\0a\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0\0\0", 28),
std::string(fixed_buffer, buffer_size));