aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/docstore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-03 16:58:18 +0200
committerGitHub <noreply@github.com>2017-05-03 16:58:18 +0200
commit56cda12279b911a004a2e8c41ab274665a7a8b5f (patch)
treef1bfc1a650ff84310a6375e3ccf02660223e8ee8 /searchlib/src/tests/docstore
parent790c0537be1444dec6e1f4c6cdb597bedb707e91 (diff)
Revert "Revert "Fix warnings hidden earlier due to including application headers as s…""
Diffstat (limited to 'searchlib/src/tests/docstore')
-rw-r--r--searchlib/src/tests/docstore/document_store/visitcache_test.cpp20
-rw-r--r--searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp8
2 files changed, 14 insertions, 14 deletions
diff --git a/searchlib/src/tests/docstore/document_store/visitcache_test.cpp b/searchlib/src/tests/docstore/document_store/visitcache_test.cpp
index 3fac4cbb954..cb41099da28 100644
--- a/searchlib/src/tests/docstore/document_store/visitcache_test.cpp
+++ b/searchlib/src/tests/docstore/document_store/visitcache_test.cpp
@@ -32,23 +32,23 @@ TEST("require that KeySet compares well") {
EXPECT_FALSE(KeySet({1,3,5}) < KeySet({1,2}));
EXPECT_TRUE(KeySet({1,2}) < KeySet({1,3,5}));
EXPECT_FALSE(KeySet({1,4}) < KeySet({1,3,5}));
- EXPECT_EQUAL(1, a.getKeys()[0]);
- EXPECT_EQUAL(2, a.getKeys()[1]);
- EXPECT_EQUAL(3, a.getKeys()[2]);
- EXPECT_EQUAL(4, a.getKeys()[3]);
- EXPECT_EQUAL(6, a.getKeys()[4]);
- EXPECT_EQUAL(9, a.getKeys()[5]);
+ EXPECT_EQUAL(1u, a.getKeys()[0]);
+ EXPECT_EQUAL(2u, a.getKeys()[1]);
+ EXPECT_EQUAL(3u, a.getKeys()[2]);
+ EXPECT_EQUAL(4u, a.getKeys()[3]);
+ EXPECT_EQUAL(6u, a.getKeys()[4]);
+ EXPECT_EQUAL(9u, a.getKeys()[5]);
}
namespace {
void verifyAB(const BlobSet & a) {
- EXPECT_EQUAL(0, a.get(8).size());
- EXPECT_EQUAL(6, a.get(7).size());
- EXPECT_EQUAL(5, a.get(9).size());
+ EXPECT_EQUAL(0u, a.get(8).size());
+ EXPECT_EQUAL(6u, a.get(7).size());
+ EXPECT_EQUAL(5u, a.get(9).size());
EXPECT_EQUAL(0, strncmp(a.get(7).c_str(), "aaaaaa", 6));
EXPECT_EQUAL(0, strncmp(a.get(9).c_str(), "bbbbb", 5));
- EXPECT_EQUAL(11, a.getBuffer().size());
+ EXPECT_EQUAL(11u, a.getBuffer().size());
EXPECT_EQUAL(0, strncmp(a.getBuffer().c_str(), "aaaaaabbbbb", 11));
}
diff --git a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
index f53423a4981..c1cd330df87 100644
--- a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
+++ b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
@@ -138,7 +138,7 @@ TEST("testThatLidInfoOrdersFileChunkSize") {
}
TEST("test that DirectIOPadding works accordng to spec") {
- constexpr size_t FILE_SIZE = 4096*3;
+ constexpr ssize_t FILE_SIZE = 4096*3;
FastOS_File file("directio.test");
file.EnableDirectIO();
EXPECT_TRUE(file.OpenReadWrite());
@@ -855,7 +855,7 @@ TEST("test that StoreByBucket gives bucket by bucket and ordered within") {
TEST("test that LidInfo has 8 bytes size and that it can represent the numbers correctly.")
{
- EXPECT_EQUAL(8, sizeof(LidInfo));
+ EXPECT_EQUAL(8u, sizeof(LidInfo));
LidInfo a(0,0,0);
EXPECT_EQUAL(0u, a.getFileId());
EXPECT_EQUAL(0u, a.getChunkId());
@@ -887,8 +887,8 @@ TEST("test that LidInfo has 8 bytes size and that it can represent the numbers c
EXPECT_TRUE(a.valid());
EXPECT_FALSE(a.empty());
a = LidInfo(0xffff,0x3fffff,0xffffff80u);
- EXPECT_EQUAL(0xffff, a.getFileId());
- EXPECT_EQUAL(0x3fffff, a.getChunkId());
+ EXPECT_EQUAL(0xffffu, a.getFileId());
+ EXPECT_EQUAL(0x3fffffu, a.getChunkId());
EXPECT_EQUAL(0xffffff80u, a.size());
EXPECT_TRUE(a.valid());
EXPECT_FALSE(a.empty());