Пример #1
0
 public function test_that_range_count_returns_zero_for_args_out_of_order()
 {
     $tree = new RedBlackSearchTree(new ComparableComparator());
     foreach ($this->getWeekDays() as $value => $key) {
         $tree->set($key, $value);
     }
     $count = $tree->rangeCount(WeekDay::THURSDAY(), WeekDay::TUESDAY());
     $this->assertSame(0, $count);
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function rangeCount($lo, $hi) : int
 {
     return $this->tree->rangeCount($lo, $hi);
 }