コード例 #1
0
 public void testHashcodeUsedAsIndex() {
   HashedTripleBunch htb = new HTB(emptyBunch);
   int limit = htb.currentCapacity();
   for (int i = 0; i < limit; i += 1) {
     TripleWithHash t = TripleWithHash.create(i, "s p o");
     htb.add(t);
     assertSame(t, htb.getItemForTestingAt(i));
   }
 }
コード例 #2
0
 public void testRemovePerformsShiftWrappingLowest() {
   int capacity = htb.currentCapacity();
   testRemovePerformsShift(1, capacity);
 }
コード例 #3
0
 public void testRemovePerformsShiftFromMiddle() {
   int capacity = htb.currentCapacity();
   testRemovePerformsShift(capacity - 3, capacity);
 }
コード例 #4
0
 public void testRemovePerformsShiftFromTop() {
   int capacity = htb.currentCapacity();
   testRemovePerformsShift(capacity - 1, capacity);
 }
コード例 #5
0
 public void testIteratorRemovePerformsShiftAndDeliversElementFromMiddle() {
   int capacity = htb.currentCapacity();
   testIteratorRemovePerformsShiftAndDeliversElement(capacity - 3, capacity);
 }