Skip to content

Commit

Permalink
handle no overlaps.
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Jan 22, 2024
1 parent 852800b commit 9196db1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/intersections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ impl Intersections {
}
}
}
if a_mode.contains(IntersectionMode::Not) && self.overlapping.len() == 0 {
self.push_overlap_fragments(&mut result, &vec![], a_part, b_part, usize::MAX);
}

Report::new(result)
}
Expand Down Expand Up @@ -800,6 +803,16 @@ mod tests {
));
}

#[test]
fn test_satisifies_reqs_bases_with_not() {
assert!(Intersections::satisfies_requirements(
1,
100,
&OverlapAmount::Bases(10),
&IntersectionMode::Not
));
}

#[test]
fn test_sufficient_bases_with_fraction() {
assert!(!Intersections::satisfies_requirements(
Expand Down

0 comments on commit 9196db1

Please sign in to comment.