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); }
/** * {@inheritdoc} */ public function rangeCount($lo, $hi) : int { return $this->tree->rangeCount($lo, $hi); }