FAQ
Author: marvin
Date: Tue Dec 1 01:20:04 2009
New Revision: 885643

URL: http://svn.apache.org/viewvc?rev=885643&view=rev
Log:
Fix some tests for NumberUtils which were incorrect because of improper
numeric type conversions.

Modified:
lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c

Modified: lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c?rev=885643&r1=885642&r2=885643&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c Tue Dec 1 01:20:04 2009
@@ -277,7 +277,7 @@
target = encoded;
for (i = 0; i < count; i++) {
u64_t got = NumUtil_decode_bigend_u64(target);
- ASSERT_INT_EQ(batch, got, ints[i], "bigend u64");
+ ASSERT_TRUE(batch, got == ints[i], "bigend u64");
target += sizeof(u64_t);
}

@@ -308,7 +308,8 @@
target = encoded;
for (i = 0; i < count; i++) {
float got = NumUtil_decode_bigend_f32(target);
- ASSERT_INT_EQ(batch, got, source[i], "bigend f32");
+ ASSERT_TRUE(batch, got == source[i], "bigend f32");
+
target += sizeof(float);
}

@@ -344,7 +345,8 @@
target = encoded;
for (i = 0; i < count; i++) {
double got = NumUtil_decode_bigend_f64(target);
- ASSERT_INT_EQ(batch, got, source[i], "bigend f64");
+ ASSERT_TRUE(batch, got == source[i], "bigend f64");
+
target += sizeof(double);
}

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouplucy-commits @
categorieslucene
postedDec 1, '09 at 1:20a
activeDec 1, '09 at 1:20a
posts1
users1
websitelucene.apache.org

1 user in discussion

Marvin: 1 post

People

Translate

site design / logo © 2018 Grokbase