use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer07.
// Shift RHS - out of bounds
@Test
public void ptrbuffer07() {
PtrBuffer pb = make(4, 5);
contains(pb, 2, 4, 6, 8);
pb.shiftUp(3);
pb.set(3, 1);
contains(pb, 2, 4, 6, 1, 8);
pb.shiftDown(3);
contains(pb, 2, 4, 6, 8);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer11.
@Test(expected = BufferException.class)
public void ptrbuffer11() {
PtrBuffer pb = make(5, 5);
contains(pb, 2, 4, 6, 8, 10);
pb.add(12);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer08.
@Test
public void ptrbuffer08() {
PtrBuffer pb = make(4, 5);
contains(pb, 2, 4, 6, 8);
pb.shiftDown(3);
contains(pb, 2, 4, 6);
pb.shiftUp(2);
contains(pb, 2, 4, -1, 6);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer29.
@Test
public void ptrbuffer29() {
PtrBuffer pb1 = make(0, 5);
PtrBuffer pb2 = make(2, 4);
pb2.copyToTop(pb1);
contains(pb1, 2, 4);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer25.
@Test
public void ptrbuffer25() {
PtrBuffer pb1 = make(0, 5);
contains(pb1);
PtrBuffer pb2 = make(3, 5);
contains(pb2, 2, 4, 6);
pb1.shiftLeft(pb2);
contains(pb1, 2);
contains(pb2, 4, 6);
}
Aggregations