summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2008-04-19 02:44:56 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2008-04-19 02:44:56 +0000
commit15465c0260125b61b7888e67a1d38d583d357893 (patch)
tree3d7a31579cd23b38d2740171f2c9375192bfeda1 /test
parent306960844b44eb1d922b3de703dac49d5638e0ca (diff)
downloadjackcess-15465c0260125b61b7888e67a1d38d583d357893.tar.gz
jackcess-15465c0260125b61b7888e67a1d38d583d357893.zip
fix tail demotion
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@336 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'test')
-rw-r--r--test/src/java/com/healthmarketscience/jackcess/BigIndexTest.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/test/src/java/com/healthmarketscience/jackcess/BigIndexTest.java b/test/src/java/com/healthmarketscience/jackcess/BigIndexTest.java
index 73f1a9c..1a7ab87 100644
--- a/test/src/java/com/healthmarketscience/jackcess/BigIndexTest.java
+++ b/test/src/java/com/healthmarketscience/jackcess/BigIndexTest.java
@@ -98,7 +98,7 @@ public class BigIndexTest extends TestCase {
System.out.println("BigIndexTest: Index type: " + index.getClass());
- // add 10,000 (pseudo) random entries to the table
+ // add 2,000 (pseudo) random entries to the table
Random rand = new Random(13L);
for(int i = 0; i < 2000; ++i) {
int nextInt = rand.nextInt(Integer.MAX_VALUE);
@@ -165,6 +165,26 @@ public class BigIndexTest extends TestCase {
assertFalse(cursor.moveToPreviousRow());
((BigIndex)index).validate();
+
+ // add 50 (pseudo) random entries to the table
+ rand = new Random(42L);
+ for(int i = 0; i < 50; ++i) {
+ int nextInt = rand.nextInt(Integer.MAX_VALUE);
+ String nextVal = "" + nextInt + extraText;
+ if(((i + 1) % 3333) == 0) {
+ nextVal = null;
+ }
+ t.addRow(nextVal, "this is some row data " + nextInt);
+ }
+
+ ((BigIndex)index).validate();
+
+ cursor = Cursor.createIndexCursor(t, index);
+ while(cursor.moveToNextRow()) {
+ cursor.deleteCurrentRow();
+ }
+
+ ((BigIndex)index).validate();
db.close();