lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r885643 - /lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c
Date Tue, 01 Dec 2009 01:20:06 GMT
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);
     }
 



Mime
View raw message