8586878889909192939495
@Test public void bpt_records_1() { BPTreeRecords bpr = make() ; fill(bpr) ; check(bpr) ; bpr.release() ; } @Before public void before() { blkMgrRecords.beginUpdate() ; } @After public void after() { blkMgrRecords.endUpdate() ; }
103104105106107108109110111112113
BPTreePage z = bpr.split() ; assertTrue(z instanceof BPTreeRecords) ; assertEquals(s, z.getCount()+bpr.getCount()) ; check(bpr) ; check((BPTreeRecords)z) ; bpr.release() ; z.release() ; } @Test public void bpt_records_3() {
113114115116117118119120121122123
{ BPTreeRecords bpr = make() ; for ( int i = 0 ; bpr.getCount() < bpr.getMaxSize() ; i++ ) insert(bpr, (i+0x20)) ; check(bpr) ; bpr.release() ; } @Test public void bpt_records_4() { BPTreeRecords bpr = make() ;
122123124125126127128129130131132
{ BPTreeRecords bpr = make() ; for ( int i = bpr.getMaxSize()-1 ; i >= 0 ; i-- ) insert(bpr, i+0x20) ; check(bpr) ; bpr.release() ; } @Test public void bpt_records_5() { BPTreeRecords bpr = make() ;
149150151152153154155156157158159
bpr.internalDelete(bpr.getHighRecord()) ; assertEquals(N-4, bpr.getCount()) ; check(bpr) ; bpr.release() ; } @Test public void bpt_records_6() { BPTreeRecords bpr = make() ;
172173174175176177178179180181182
r = bpr.getHighRecord() ; r2 = search(bpr, r) ; assertTrue(Record.keyEQ(r, r2)) ; bpr.release() ; } @Test public void bpt_shift_1() { BPTreeRecords bpr1 = make() ;
188189190191192193194195196197198
//assertTrue(Record.keyEQ(r, RecordTestLib.intToRecord(10))) ; contains(bpr1) ; contains(bpr2, 10) ; bpr1.release() ; bpr2.release() ; } @Test public void bpt_shift_2() {
204205206207208209210211212213214
assertTrue(Record.keyEQ(r, RecordLib.intToRecord(10))) ; contains(bpr1) ; contains(bpr2, 10) ; bpr1.release() ; bpr2.release() ; } @Test public void bpt_shift_3() { BPTreeRecords bpr1 = make() ;
221222223224225226227228229230231
assertTrue(r+" != "+RecordLib.intToRecord(10), Record.keyEQ(r, RecordLib.intToRecord(10))) ; contains(bpr1, 10) ; contains(bpr2, 20, 99) ; bpr1.release() ; bpr2.release() ; } @Test public void bpt_shift_4() { BPTreeRecords bpr1 = make() ;
238239240241242243244245246247248
assertTrue(Record.keyEQ(r, RecordLib.intToRecord(10))) ; contains(bpr1, 20) ; contains(bpr2, 5, 10) ; bpr1.release() ; bpr2.release() ; } @Test public void bpt_merge_1() { BPTreeRecords bpr1 = make() ;