Skip to content
Snippets Groups Projects
Commit f8941282 authored by Kevin Kaßelmann's avatar Kevin Kaßelmann
Browse files

[BPTree] removed ignore from test

parent dc3bb558
No related branches found
No related tags found
No related merge requests found
...@@ -278,7 +278,6 @@ impl MinMax { ...@@ -278,7 +278,6 @@ impl MinMax {
} }
fn bwd_search(&self, index: u64, diff: i64) -> Result<u64, NodeError> { fn bwd_search(&self, index: u64, diff: i64) -> Result<u64, NodeError> {
let mut block_no = index / self.block_size; let mut block_no = index / self.block_size;
let mut begin_of_block = block_no * self.block_size; let mut begin_of_block = block_no * self.block_size;
let mut end_of_block = begin_of_block + self.block_size - 1; let mut end_of_block = begin_of_block + self.block_size - 1;
...@@ -309,8 +308,9 @@ impl MinMax { ...@@ -309,8 +308,9 @@ impl MinMax {
while bottom_up && current_node > 0 { while bottom_up && current_node > 0 {
if current_node % 2 == 0 { if current_node % 2 == 0 {
if self.heap[current_node as usize -1].max_excess >= look_for && if self.heap[current_node as usize - 1].max_excess >= look_for
self.heap[current_node as usize -1].min_excess <= look_for { && self.heap[current_node as usize - 1].min_excess <= look_for
{
bottom_up = false; bottom_up = false;
top_down = true; top_down = true;
current_node -= 1; current_node -= 1;
...@@ -324,20 +324,20 @@ impl MinMax { ...@@ -324,20 +324,20 @@ impl MinMax {
} }
while top_down { while top_down {
if self.heap[current_node as usize * 2 + 2].max_excess >= look_for && if self.heap[current_node as usize * 2 + 2].max_excess >= look_for
self.heap[current_node as usize * 2 + 2].min_excess <= look_for { && self.heap[current_node as usize * 2 + 2].min_excess <= look_for
{
current_node = current_node * 2 + 2; current_node = current_node * 2 + 2;
} else if self.heap[current_node as usize * 2 + 1].max_excess >= look_for && } else if self.heap[current_node as usize * 2 + 1].max_excess >= look_for
self.heap[current_node as usize * 2 + 1].min_excess <= look_for { && self.heap[current_node as usize * 2 + 1].min_excess <= look_for
{
current_node = current_node * 2 + 1; current_node = current_node * 2 + 1;
} }
if current_node < self.heap.len() as u64 / 2 { if current_node < self.heap.len() as u64 / 2 {
top_down = false; top_down = false;
} }
} }
} }
Ok(1) Ok(1)
......
...@@ -391,7 +391,6 @@ mod tests { ...@@ -391,7 +391,6 @@ mod tests {
} }
#[test] #[test]
#[ignore]
fn next_sibling() { fn next_sibling() {
let bitvec = bit_vec!(true, true, false, true, false, false); let bitvec = bit_vec!(true, true, false, true, false, false);
let tree: BPTree<String> = BPTree::from_bitvec(bitvec.clone()).unwrap(); let tree: BPTree<String> = BPTree::from_bitvec(bitvec.clone()).unwrap();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment