PtrBuffer extends BufferBase { public void set(int idx, int val) { checkBounds(idx, numSlot) ; _set(idx, val) ; } private  PtrBuffer(int maxRec);  PtrBuffer(ByteBuffer bb, int num); int get(int idx); int getHigh(); int getLow(); void add(int val); void add(int idx, int val); void set(int idx, int val); @Override String toString(); PtrBuffer duplicate();  }
@Test public void ptrbuffer03() { PtrBuffer pb = make(4,5) ; contains(pb, 2, 4, 6, 8) ; pb.shiftUp(0) ; pb.set(0, 99) ; contains(pb, 99, 2, 4, 6, 8) ; pb.shiftDown(0) ; contains(pb, 2, 4, 6, 8) ; }
@Test public void ptrbuffer04() { PtrBuffer pb = make(4,5) ; contains(pb, 2, 4, 6, 8) ; pb.shiftDown(0) ; contains(pb, 4, 6, 8) ; pb.shiftUp(0) ; pb.set(0,1) ; contains(pb, 1, 4, 6, 8) ; }
@Test public void ptrbuffer05() { PtrBuffer pb = make(4,5) ; contains(pb, 2, 4, 6, 8) ; pb.shiftUp(2) ; pb.set(2, 0) ; contains(pb, 2, 4, 0, 6, 8) ; pb.shiftDown(2) ; contains(pb, 2, 4, 6, 8) ; }
@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) ; }