Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed bugs in testDocIdSetFactory and testVeryBigNumbers

  • Loading branch information...
commit 2822e095cc93d0afd939e749ab99862b41aae2c5 1 parent e165773
@hyan authored
View
3  src/test/java/com/kamikaze/test/PForDeltaKamikazeTest.java
@@ -114,12 +114,13 @@ public void testVeryBigNumbers() throws Exception
// test the accuracy of compressing/decompressing a sequence of big numbers
System.out.println("Running test case: testVeryBigNumbers ");
Random random = new Random(0);
- int blockNum = 800;
+ int blockNum = 10;
int blockSize = 128;
int[][] input = new int[blockNum][];
for(int i=0; i<blockNum; i++)
{
+ input[i] = new int[blockSize];
for(int j=0; j<blockSize; j++)
{
input[i][j] = random.nextInt() & Integer.MAX_VALUE;
View
2  src/test/java/com/kamikaze/test/TestDocIdSetSuite.java
@@ -7,6 +7,8 @@
@RunWith(Suite.class)
//@SuiteClasses( {PForDeltaKamikazeTest.class})
@SuiteClasses( { PForDeltaKamikazeTest.class, PForDeltaMultiThreadedAccessTest.class, TestBooleanDocIdSet.class, TestDocSetFactory.class, TestDocSets.class, TestDocSetSerialization.class, TestKamikaze.class, TestMultiThreadedAccess.class, TestParameterizedDocSets.class})
+//@SuiteClasses( { PForDeltaKamikazeTest.class})
+
//@SuiteClasses( { PForDeltaMultiThreadedAccessTest.class, TestMultiThreadedAccess.class})
public class TestDocIdSetSuite {
}
View
22 src/test/java/com/kamikaze/test/TestDocSetFactory.java
@@ -32,8 +32,8 @@ public void testDocSetFactory() {
assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.IntArrayDocIdSet");
set = DocSetFactory.getDocSetInstance(min, max, count, FOCUS.SPACE);
- //assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.P4DDocIdSet");
- assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.PForDeltaDocIdSet");
+ assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.P4DDocIdSet");
+ //assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.PForDeltaDocIdSet");
set = DocSetFactory.getDocSetInstance(min, max, count, FOCUS.OPTIMAL);
assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.IntArrayDocIdSet");
@@ -44,13 +44,13 @@ public void testDocSetFactory() {
set = DocSetFactory.getDocSetInstance(min, max, count, FOCUS.OPTIMAL);
assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.IntArrayDocIdSet");
-// count *=10000;
-// set = DocSetFactory.getDocSetInstance(min, max, count, FOCUS.OPTIMAL);
-// assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.P4DDocIdSet");
-
count *=10000;
set = DocSetFactory.getDocSetInstance(min, max, count, FOCUS.OPTIMAL);
- assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.PForDeltaDocIdSet");
+ assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.P4DDocIdSet");
+
+// count *=10000;
+// set = DocSetFactory.getDocSetInstance(min, max, count, FOCUS.OPTIMAL);
+// assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.PForDeltaDocIdSet");
max = 1000000000;
count*=1000;
@@ -66,11 +66,11 @@ public void testDocSetFactory() {
count /= 10000000;
-// set = DocSetFactory.getDocSetInstance(min, max, count, FOCUS.SPACE);
-// assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.P4DDocIdSet");
-
set = DocSetFactory.getDocSetInstance(min, max, count, FOCUS.SPACE);
- assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.PForDeltaDocIdSet");
+ assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.P4DDocIdSet");
+
+// set = DocSetFactory.getDocSetInstance(min, max, count, FOCUS.SPACE);
+// assertEquals(set.getClass().getName(), "com.kamikaze.docidset.impl.PForDeltaDocIdSet");
min = 10;
max = 30000000;
Please sign in to comment.
Something went wrong with that request. Please try again.