git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1210116 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-12-04 14:35:46 +00:00
parent d99ad4fabc
commit c9ad724c19
2 changed files with 6 additions and 2 deletions

View File

@ -36,6 +36,7 @@ public class FloatMagicTest extends LuceneTestCase {
for (int i = 0; i < floats.size(); i++) { for (int i = 0; i < floats.size(); i++) {
int4[i] = FloatMagic.toSortable(floats.get(i)) & 0xffffffffL; int4[i] = FloatMagic.toSortable(floats.get(i)) & 0xffffffffL;
/*
System.out.println( System.out.println(
String.format("raw %8s sortable %8s %8s numutils %8s %s", String.format("raw %8s sortable %8s %8s numutils %8s %s",
Integer.toHexString(Float.floatToRawIntBits(floats.get(i))), Integer.toHexString(Float.floatToRawIntBits(floats.get(i))),
@ -43,6 +44,7 @@ public class FloatMagicTest extends LuceneTestCase {
Integer.toHexString(FloatMagic.unsignedOrderedToFloatBits(FloatMagic.toSortable(floats.get(i)))), Integer.toHexString(FloatMagic.unsignedOrderedToFloatBits(FloatMagic.toSortable(floats.get(i)))),
Integer.toHexString(NumericUtils.floatToSortableInt(floats.get(i))), Integer.toHexString(NumericUtils.floatToSortableInt(floats.get(i))),
floats.get(i))); floats.get(i)));
*/
} }
// Sort and compare. Should be identical order. // Sort and compare. Should be identical order.
@ -52,10 +54,12 @@ public class FloatMagicTest extends LuceneTestCase {
backFromFixed.add(FloatMagic.fromSortable((int) int4[i])); backFromFixed.add(FloatMagic.fromSortable((int) int4[i]));
} }
/*
for (int i = 0; i < int4.length; i++) { for (int i = 0; i < int4.length; i++) {
System.out.println( System.out.println(
floats.get(i) + " " + FloatMagic.fromSortable((int) int4[i])); floats.get(i) + " " + FloatMagic.fromSortable((int) int4[i]));
} }
*/
assertEquals(floats, backFromFixed); assertEquals(floats, backFromFixed);
} }

View File

@ -87,8 +87,8 @@ public class TestSort extends LuceneTestCase {
File sorted = new File(tempDir, "sorted"); File sorted = new File(tempDir, "sorted");
SortInfo sortInfo = sort.sort(unsorted, sorted); SortInfo sortInfo = sort.sort(unsorted, sorted);
System.out.println("Input size [MB]: " + unsorted.length() / (1024 * 1024)); //System.out.println("Input size [MB]: " + unsorted.length() / (1024 * 1024));
System.out.println(sortInfo); //System.out.println(sortInfo);
assertFilesIdentical(golden, sorted); assertFilesIdentical(golden, sorted);
return sortInfo; return sortInfo;