You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2015/08/04 21:56:59 UTC
lucy git commit: Adjust for TEST_INT_EQ changes
Repository: lucy
Updated Branches:
refs/heads/master eded0db31 -> 199561eaf
Adjust for TEST_INT_EQ changes
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/199561ea
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/199561ea
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/199561ea
Branch: refs/heads/master
Commit: 199561eaf377a9556e58b04123026363ee993bc7
Parents: eded0db
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Aug 4 21:40:48 2015 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Tue Aug 4 21:55:16 2015 +0200
----------------------------------------------------------------------
core/Lucy/Test/Util/TestNumberUtils.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/199561ea/core/Lucy/Test/Util/TestNumberUtils.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestNumberUtils.c b/core/Lucy/Test/Util/TestNumberUtils.c
index c639daf..70a63a6 100644
--- a/core/Lucy/Test/Util/TestNumberUtils.c
+++ b/core/Lucy/Test/Util/TestNumberUtils.c
@@ -113,12 +113,13 @@ test_c32(TestBatchRunner *runner) {
mins[set_num], limits[set_num]);
target = encoded;
for (size_t i = 0; i < count; i++) {
+ ints[i] = (uint32_t)ints[i];
NumUtil_encode_c32((uint32_t)ints[i], &target);
}
decode = encoded;
skip = encoded;
for (size_t i = 0; i < count; i++) {
- TEST_INT_EQ(runner, NumUtil_decode_c32(&decode), (long)ints[i],
+ TEST_INT_EQ(runner, NumUtil_decode_c32(&decode), ints[i],
"c32 %lu", (long)ints[i]);
NumUtil_skip_cint(&skip);
if (decode > limit) { THROW(ERR, "overrun"); }
@@ -136,7 +137,7 @@ test_c32(TestBatchRunner *runner) {
decode = encoded;
skip = encoded;
for (size_t i = 0; i < count; i++) {
- TEST_INT_EQ(runner, NumUtil_decode_c32(&decode), (long)ints[i],
+ TEST_INT_EQ(runner, NumUtil_decode_c32(&decode), ints[i],
"padded c32 %lu", (long)ints[i]);
NumUtil_skip_cint(&skip);
if (decode > limit) { THROW(ERR, "overrun"); }
@@ -239,13 +240,14 @@ test_bigend_u32(TestBatchRunner *runner) {
char *target = encoded;
for (size_t i = 0; i < count; i++) {
+ ints[i] = (uint32_t)ints[i];
NumUtil_encode_bigend_u32((uint32_t)ints[i], &target);
target += sizeof(uint32_t);
}
target = encoded;
for (size_t i = 0; i < count; i++) {
uint32_t got = NumUtil_decode_bigend_u32(target);
- TEST_INT_EQ(runner, got, (long)ints[i], "bigend u32");
+ TEST_INT_EQ(runner, got, ints[i], "bigend u32");
target += sizeof(uint32_t);
}