You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2016/05/02 21:04:20 UTC
[1/4] lucy git commit: Make straightforward int type adjustments.
Repository: lucy
Updated Branches:
refs/heads/master a26954e8e -> 4677247ce
Make straightforward int type adjustments.
Either cast or change types to quiet -Wconversion warnings.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/882fbc1e
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/882fbc1e
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/882fbc1e
Branch: refs/heads/master
Commit: 882fbc1e9e0006e79d4eaaacef8f30444e88c924
Parents: 641449d
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Tue Apr 26 18:05:44 2016 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Tue Apr 26 18:20:29 2016 -0700
----------------------------------------------------------------------
core/Lucy/Test/Analysis/TestNormalizer.c | 2 +-
core/Lucy/Test/Index/TestPolyReader.c | 8 ++++----
core/Lucy/Test/Search/TestSeriesMatcher.c | 2 +-
core/Lucy/Test/Store/TestIOPrimitives.c | 6 +++---
core/Lucy/Test/Store/TestInStream.c | 2 +-
core/Lucy/Test/Util/TestSortExternal.c | 20 ++++++++++----------
6 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/882fbc1e/core/Lucy/Test/Analysis/TestNormalizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Analysis/TestNormalizer.c b/core/Lucy/Test/Analysis/TestNormalizer.c
index 2323c2e..6bb0fb7 100644
--- a/core/Lucy/Test/Analysis/TestNormalizer.c
+++ b/core/Lucy/Test/Analysis/TestNormalizer.c
@@ -156,7 +156,7 @@ test_utf8proc_normalization(TestBatchRunner *runner) {
// Normalize again.
size_t normalized_len = strlen((char*)normalized);
uint8_t *dupe;
- int32_t dupe_check = utf8proc_map(normalized, normalized_len, &dupe,
+ int32_t dupe_check = utf8proc_map(normalized, (ssize_t)normalized_len, &dupe,
UTF8PROC_STABLE |
UTF8PROC_COMPOSE |
UTF8PROC_COMPAT |
http://git-wip-us.apache.org/repos/asf/lucy/blob/882fbc1e/core/Lucy/Test/Index/TestPolyReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Index/TestPolyReader.c b/core/Lucy/Test/Index/TestPolyReader.c
index 91ebd98..e8b8a67 100644
--- a/core/Lucy/Test/Index/TestPolyReader.c
+++ b/core/Lucy/Test/Index/TestPolyReader.c
@@ -30,15 +30,15 @@ TestPolyReader_new() {
static void
test_sub_tick(TestBatchRunner *runner) {
- size_t num_segs = 255;
+ uint32_t num_segs = 255;
int32_t *ints = (int32_t*)MALLOCATE(num_segs * sizeof(int32_t));
- size_t i;
+ uint32_t i;
for (i = 0; i < num_segs; i++) {
- ints[i] = i;
+ ints[i] = (int32_t)i;
}
I32Array *offsets = I32Arr_new(ints, num_segs);
for (i = 1; i < num_segs; i++) {
- if (PolyReader_sub_tick(offsets, i) != i - 1) { break; }
+ if (PolyReader_sub_tick(offsets, (int32_t)i) != i - 1) { break; }
}
TEST_UINT_EQ(runner, i, num_segs, "got all sub_tick() calls right");
DECREF(offsets);
http://git-wip-us.apache.org/repos/asf/lucy/blob/882fbc1e/core/Lucy/Test/Search/TestSeriesMatcher.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Search/TestSeriesMatcher.c b/core/Lucy/Test/Search/TestSeriesMatcher.c
index 0fd0ae6..bdd2e78 100644
--- a/core/Lucy/Test/Search/TestSeriesMatcher.c
+++ b/core/Lucy/Test/Search/TestSeriesMatcher.c
@@ -61,7 +61,7 @@ S_make_series_matcher(I32Array *doc_ids, I32Array *offsets, int32_t doc_max) {
static I32Array*
S_generate_match_list(int32_t first, int32_t max, int32_t doc_inc) {
int32_t count = (max - first + doc_inc - 1) / doc_inc;
- int32_t *doc_ids = (int32_t*)MALLOCATE(count * sizeof(int32_t));
+ int32_t *doc_ids = (int32_t*)MALLOCATE((size_t)count * sizeof(int32_t));
int32_t doc_id = first;
int32_t i = 0;
http://git-wip-us.apache.org/repos/asf/lucy/blob/882fbc1e/core/Lucy/Test/Store/TestIOPrimitives.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Store/TestIOPrimitives.c b/core/Lucy/Test/Store/TestIOPrimitives.c
index 9b78e82..e7d32f2 100644
--- a/core/Lucy/Test/Store/TestIOPrimitives.c
+++ b/core/Lucy/Test/Store/TestIOPrimitives.c
@@ -48,7 +48,7 @@ test_i8(TestBatchRunner *runner) {
int i;
for (i = -128; i < 128; i++) {
- OutStream_Write_I8(outstream, i);
+ OutStream_Write_I8(outstream, (int8_t)i);
}
OutStream_Close(outstream);
@@ -72,7 +72,7 @@ test_u8(TestBatchRunner *runner) {
int i;
for (i = 0; i < 256; i++) {
- OutStream_Write_U8(outstream, i);
+ OutStream_Write_U8(outstream, (uint8_t)i);
}
OutStream_Close(outstream);
@@ -398,7 +398,7 @@ test_cu64(TestBatchRunner *runner) {
for (i = 0; i < 1000; i++) {
char buffer[10];
const char *buf = buffer;
- size_t size = InStream_Read_Raw_C64(raw_instream, buffer);
+ int size = InStream_Read_Raw_C64(raw_instream, buffer);
uint64_t got = NumUtil_decode_cu64(&buf);
UNUSED_VAR(size);
if (got != ints[i]) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/882fbc1e/core/Lucy/Test/Store/TestInStream.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Store/TestInStream.c b/core/Lucy/Test/Store/TestInStream.c
index 3aaf42d..c32f985 100644
--- a/core/Lucy/Test/Store/TestInStream.c
+++ b/core/Lucy/Test/Store/TestInStream.c
@@ -104,7 +104,7 @@ test_Clone_and_Reopen(TestBatchRunner *runner) {
InStream *clone;
InStream *reopened;
- for (uint32_t i = 0; i < 26; i++) {
+ for (uint8_t i = 0; i < 26; i++) {
OutStream_Write_U8(outstream, 'a' + i);
}
OutStream_Close(outstream);
http://git-wip-us.apache.org/repos/asf/lucy/blob/882fbc1e/core/Lucy/Test/Util/TestSortExternal.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestSortExternal.c b/core/Lucy/Test/Util/TestSortExternal.c
index c648595..b55dcc2 100644
--- a/core/Lucy/Test/Util/TestSortExternal.c
+++ b/core/Lucy/Test/Util/TestSortExternal.c
@@ -234,12 +234,12 @@ test_sort_packed_ints(TestBatchRunner *runner) {
Vector *blobs = Vec_new(num_ints);
for (uint32_t i = 0; i < num_ints; ++i) {
- char buf[4];
- buf[0] = i >> 24;
- buf[1] = i >> 16;
- buf[2] = i >> 8;
- buf[3] = i;
- Blob *blob = Blob_new(buf, 4);
+ uint8_t buf[4];
+ buf[0] = (uint8_t)((i >> 24) & 0xFF);
+ buf[1] = (uint8_t)((i >> 16) & 0xFF);
+ buf[2] = (uint8_t)((i >> 8) & 0xFF);
+ buf[3] = (uint8_t)(i & 0xFF);
+ Blob *blob = Blob_new((char*)buf, 4);
Vec_Push(blobs, (Obj*)blob);
}
@@ -254,12 +254,12 @@ test_sort_random_strings(TestBatchRunner *runner) {
Vector *blobs = Vec_new(num_strings);
for (uint32_t i = 0; i < num_strings; ++i) {
- char buf[1201];
+ uint8_t buf[1201];
int size = rand() % 1200 + 1;
for (int i = 0; i < size; ++i) {
- buf[i] = rand();
+ buf[i] = (uint8_t)(rand() % 256);
}
- Blob *blob = Blob_new(buf, (size_t)size);
+ Blob *blob = Blob_new((char*)buf, (size_t)size);
Vec_Push(blobs, (Obj*)blob);
}
@@ -273,7 +273,7 @@ test_sort_random_strings(TestBatchRunner *runner) {
static void
test_run(TestBatchRunner *runner) {
Vector *letters = Vec_new(26);
- for (int i = 0; i < 26; ++i) {
+ for (char i = 0; i < 26; ++i) {
char ch = 'a' + i;
Blob *blob = Blob_new(&ch, 1);
Vec_Push(letters, (Obj*)blob);
[4/4] lucy git commit: Merge branch 'LUCY-295-tests-int-types'
Posted by ma...@apache.org.
Merge branch 'LUCY-295-tests-int-types'
Fix -Wconversion warnings in the Lucy unit tests.
This closes #45.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/4677247c
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/4677247c
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/4677247c
Branch: refs/heads/master
Commit: 4677247ce93d1fc5d6979e784c1c41bc518225ff
Parents: a26954e 882fbc1
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Mon May 2 11:53:01 2016 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Mon May 2 11:53:01 2016 -0700
----------------------------------------------------------------------
core/Lucy/Test/Analysis/TestNormalizer.c | 2 +-
core/Lucy/Test/Index/TestPolyReader.c | 10 +++++-----
core/Lucy/Test/Search/TestQueryParserLogic.c | 24 +++++++++++------------
core/Lucy/Test/Search/TestSeriesMatcher.c | 2 +-
core/Lucy/Test/Store/TestIOPrimitives.c | 6 +++---
core/Lucy/Test/Store/TestInStream.c | 2 +-
core/Lucy/Test/Util/TestMemoryPool.c | 12 ++++++------
core/Lucy/Test/Util/TestNumberUtils.c | 12 ++++++------
core/Lucy/Test/Util/TestSortExternal.c | 20 +++++++++----------
9 files changed, 45 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
[3/4] lucy git commit: Switch test macro from signed to unsigned.
Posted by ma...@apache.org.
Switch test macro from signed to unsigned.
Use TEST_UINT_EQ instead of TEST_INT_EQ as needed.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/bbac126a
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/bbac126a
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/bbac126a
Branch: refs/heads/master
Commit: bbac126ab9d815d8519dfe3f008db572a3ea4305
Parents: 2d6629e
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Tue Apr 26 15:43:31 2016 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Tue Apr 26 18:20:29 2016 -0700
----------------------------------------------------------------------
core/Lucy/Test/Index/TestPolyReader.c | 2 +-
core/Lucy/Test/Util/TestMemoryPool.c | 12 ++++++------
core/Lucy/Test/Util/TestNumberUtils.c | 12 ++++++------
3 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/bbac126a/core/Lucy/Test/Index/TestPolyReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Index/TestPolyReader.c b/core/Lucy/Test/Index/TestPolyReader.c
index 44a99a9..91ebd98 100644
--- a/core/Lucy/Test/Index/TestPolyReader.c
+++ b/core/Lucy/Test/Index/TestPolyReader.c
@@ -40,7 +40,7 @@ test_sub_tick(TestBatchRunner *runner) {
for (i = 1; i < num_segs; i++) {
if (PolyReader_sub_tick(offsets, i) != i - 1) { break; }
}
- TEST_INT_EQ(runner, i, num_segs, "got all sub_tick() calls right");
+ TEST_UINT_EQ(runner, i, num_segs, "got all sub_tick() calls right");
DECREF(offsets);
FREEMEM(ints);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/bbac126a/core/Lucy/Test/Util/TestMemoryPool.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestMemoryPool.c b/core/Lucy/Test/Util/TestMemoryPool.c
index 02b2ac7..7e960ab 100644
--- a/core/Lucy/Test/Util/TestMemoryPool.c
+++ b/core/Lucy/Test/Util/TestMemoryPool.c
@@ -39,11 +39,11 @@ TestMemPool_Run_IMP(TestMemoryPool *self, TestBatchRunner *runner) {
ptr_a = (char*)MemPool_Grab(mem_pool, 10);
size_t expected = sizeof(void*) == 8 ? 16 : 12;
- TEST_INT_EQ(runner, MemPool_Get_Consumed(mem_pool), expected,
- "Round up allocation to word size");
+ TEST_UINT_EQ(runner, MemPool_Get_Consumed(mem_pool), expected,
+ "Round up allocation to word size");
ptr_b = (char*)MemPool_Grab(mem_pool, 10);
- TEST_INT_EQ(runner, MemPool_Get_Consumed(mem_pool), expected * 2,
- "Accumulate consumed.");
+ TEST_UINT_EQ(runner, MemPool_Get_Consumed(mem_pool), expected * 2,
+ "Accumulate consumed.");
ptr_a = ivars->buf;
MemPool_Resize(mem_pool, ptr_b, 6);
@@ -52,8 +52,8 @@ TestMemPool_Run_IMP(TestMemoryPool *self, TestBatchRunner *runner) {
"Resize() adjusts `consumed`");
MemPool_Release_All(mem_pool);
- TEST_INT_EQ(runner, MemPool_Get_Consumed(mem_pool), 0,
- "Release_All() resets `consumed`");
+ TEST_UINT_EQ(runner, MemPool_Get_Consumed(mem_pool), 0,
+ "Release_All() resets `consumed`");
DECREF(mem_pool);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/bbac126a/core/Lucy/Test/Util/TestNumberUtils.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestNumberUtils.c b/core/Lucy/Test/Util/TestNumberUtils.c
index 58b60e2..0835b08 100644
--- a/core/Lucy/Test/Util/TestNumberUtils.c
+++ b/core/Lucy/Test/Util/TestNumberUtils.c
@@ -167,8 +167,8 @@ test_cu32(TestBatchRunner *runner) {
decode = encoded;
skip = encoded;
for (size_t i = 0; i < count; i++) {
- TEST_INT_EQ(runner, NumUtil_decode_cu32(&decode), ints[i],
- "cu32 %lu", (long)ints[i]);
+ TEST_UINT_EQ(runner, NumUtil_decode_cu32(&decode), ints[i],
+ "cu32 %lu", (unsigned long)ints[i]);
NumUtil_skip_cint(&skip);
if (decode > limit) { THROW(ERR, "overrun"); }
}
@@ -185,8 +185,8 @@ test_cu32(TestBatchRunner *runner) {
decode = encoded;
skip = encoded;
for (size_t i = 0; i < count; i++) {
- TEST_INT_EQ(runner, NumUtil_decode_cu32(&decode), ints[i],
- "padded cu32 %lu", (long)ints[i]);
+ TEST_UINT_EQ(runner, NumUtil_decode_cu32(&decode), ints[i],
+ "padded cu32 %lu", (unsigned long)ints[i]);
NumUtil_skip_cint(&skip);
if (decode > limit) { THROW(ERR, "overrun"); }
}
@@ -197,7 +197,7 @@ test_cu32(TestBatchRunner *runner) {
target = encoded;
NumUtil_encode_cu32(UINT32_MAX, &target);
decode = encoded;
- TEST_INT_EQ(runner, NumUtil_decode_cu32(&decode), UINT32_MAX, "cu32 UINT32_MAX");
+ TEST_UINT_EQ(runner, NumUtil_decode_cu32(&decode), UINT32_MAX, "cu32 UINT32_MAX");
FREEMEM(encoded);
FREEMEM(ints);
@@ -346,7 +346,7 @@ test_bigend_u32(TestBatchRunner *runner) {
target = encoded;
for (size_t i = 0; i < count; i++) {
uint32_t got = NumUtil_decode_bigend_u32(target);
- TEST_INT_EQ(runner, got, ints[i], "bigend u32");
+ TEST_UINT_EQ(runner, got, ints[i], "bigend u32");
target += sizeof(uint32_t);
}
[2/4] lucy git commit: Be consistent about using correct integer type.
Posted by ma...@apache.org.
Be consistent about using correct integer type.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/641449df
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/641449df
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/641449df
Branch: refs/heads/master
Commit: 641449dfe744acce2bcee78f7312d40fbf90dd04
Parents: bbac126
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Tue Apr 26 18:03:08 2016 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Tue Apr 26 18:20:29 2016 -0700
----------------------------------------------------------------------
core/Lucy/Test/Search/TestQueryParserLogic.c | 24 +++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/641449df/core/Lucy/Test/Search/TestQueryParserLogic.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Search/TestQueryParserLogic.c b/core/Lucy/Test/Search/TestQueryParserLogic.c
index e3066e1..22104fd 100644
--- a/core/Lucy/Test/Search/TestQueryParserLogic.c
+++ b/core/Lucy/Test/Search/TestQueryParserLogic.c
@@ -477,7 +477,7 @@ logical_test_a_AND_b_AND_c_d(uint32_t boolop) {
Query *left = make_poly_query(BOOLOP_AND, a_query, b_query, c_query,
NULL);
Query *tree = make_poly_query(boolop, left, d_query, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 1 : 2;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 1 : 2;
return TestQP_new("a AND b AND c d", tree, NULL, num_hits);
}
@@ -490,7 +490,7 @@ logical_test_a_AND_b_OR_c_d(uint32_t boolop) {
Query *inner = make_poly_query(BOOLOP_AND, a_query, b_query, NULL);
Query *left = make_poly_query(BOOLOP_OR, inner, c_query, NULL);
Query *tree = make_poly_query(boolop, left, d_query, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 1 : 3;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 1 : 3;
return TestQP_new("a AND b OR c d", tree, NULL, num_hits);
}
@@ -503,7 +503,7 @@ logical_test_a_OR_b_AND_c_d(uint32_t boolop) {
Query *inner = make_poly_query(BOOLOP_AND, b_query, c_query, NULL);
Query *left = make_poly_query(BOOLOP_OR, a_query, inner, NULL);
Query *tree = make_poly_query(boolop, left, d_query, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 1 : 4;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 1 : 4;
return TestQP_new("a OR b AND c d", tree, NULL, num_hits);
}
@@ -516,7 +516,7 @@ logical_test_a_OR_b_OR_c_d(uint32_t boolop) {
Query *left = make_poly_query(BOOLOP_OR, a_query, b_query, c_query,
NULL);
Query *tree = make_poly_query(boolop, left, d_query, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 1 : 4;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 1 : 4;
return TestQP_new("a OR b OR c d", tree, NULL, num_hits);
}
@@ -529,7 +529,7 @@ logical_test_a_AND_b_c_AND_d(uint32_t boolop) {
Query *left = make_poly_query(BOOLOP_AND, a_query, b_query, NULL);
Query *right = make_poly_query(BOOLOP_AND, c_query, d_query, NULL);
Query *tree = make_poly_query(boolop, left, right, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 1 : 3;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 1 : 3;
return TestQP_new("a AND b c AND d", tree, NULL, num_hits);
}
@@ -542,7 +542,7 @@ logical_test_a_AND_b_c_OR_d(uint32_t boolop) {
Query *left = make_poly_query(BOOLOP_AND, a_query, b_query, NULL);
Query *right = make_poly_query(BOOLOP_OR, c_query, d_query, NULL);
Query *tree = make_poly_query(boolop, left, right, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 2 : 3;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 2 : 3;
return TestQP_new("a AND b c OR d", tree, NULL, num_hits);
}
@@ -555,7 +555,7 @@ logical_test_a_OR_b_c_AND_d(uint32_t boolop) {
Query *left = make_poly_query(BOOLOP_OR, a_query, b_query, NULL);
Query *right = make_poly_query(BOOLOP_AND, c_query, d_query, NULL);
Query *tree = make_poly_query(boolop, left, right, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 1 : 4;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 1 : 4;
return TestQP_new("a OR b c AND d", tree, NULL, num_hits);
}
@@ -568,7 +568,7 @@ logical_test_a_OR_b_c_OR_d(uint32_t boolop) {
Query *left = make_poly_query(BOOLOP_OR, a_query, b_query, NULL);
Query *right = make_poly_query(BOOLOP_OR, c_query, d_query, NULL);
Query *tree = make_poly_query(boolop, left, right, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 2 : 4;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 2 : 4;
return TestQP_new("a OR b c OR d", tree, NULL, num_hits);
}
@@ -581,7 +581,7 @@ logical_test_a_b_AND_c_AND_d(uint32_t boolop) {
Query *right = make_poly_query(BOOLOP_AND, b_query, c_query, d_query,
NULL);
Query *tree = make_poly_query(boolop, a_query, right, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 1 : 4;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 1 : 4;
return TestQP_new("a b AND c AND d", tree, NULL, num_hits);
}
@@ -594,7 +594,7 @@ logical_test_a_b_AND_c_OR_d(uint32_t boolop) {
Query *inner = make_poly_query(BOOLOP_AND, b_query, c_query, NULL);
Query *right = make_poly_query(BOOLOP_OR, inner, d_query, NULL);
Query *tree = make_poly_query(boolop, a_query, right, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 2 : 4;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 2 : 4;
return TestQP_new("a b AND c OR d", tree, NULL, num_hits);
}
@@ -607,7 +607,7 @@ logical_test_a_b_OR_c_AND_d(uint32_t boolop) {
Query *inner = make_poly_query(BOOLOP_AND, c_query, d_query, NULL);
Query *right = make_poly_query(BOOLOP_OR, b_query, inner, NULL);
Query *tree = make_poly_query(boolop, a_query, right, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 3 : 4;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 3 : 4;
return TestQP_new("a b OR c AND d", tree, NULL, num_hits);
}
@@ -620,7 +620,7 @@ logical_test_a_b_OR_c_OR_d(uint32_t boolop) {
Query *right = make_poly_query(BOOLOP_OR, b_query, c_query, d_query,
NULL);
Query *tree = make_poly_query(boolop, a_query, right, NULL);
- int32_t num_hits = boolop == BOOLOP_AND ? 3 : 4;
+ uint32_t num_hits = boolop == BOOLOP_AND ? 3 : 4;
return TestQP_new("a b OR c OR d", tree, NULL, num_hits);
}