all non-doc tests passing
This commit is contained in:
parent
a8db4b1504
commit
3ae6e651e9
@ -227,5 +227,6 @@ pub mod range_bounds_map;
|
||||
pub mod range_bounds_set;
|
||||
|
||||
pub use crate::discrete_bounds::FiniteBounds;
|
||||
pub use crate::discrete_finite::DiscreteFinite;
|
||||
pub use crate::range_bounds_map::{OverlapError, RangeBoundsMap};
|
||||
pub use crate::range_bounds_set::RangeBoundsSet;
|
||||
|
@ -1467,14 +1467,20 @@ where
|
||||
I: Ord + Copy + DiscreteFinite,
|
||||
K: FiniteRange<I>,
|
||||
{
|
||||
move |inner_range: &K| start.cmp(&inner_range.end().up().unwrap())
|
||||
move |inner_range: &K| match inner_range.end().up() {
|
||||
Some(touching_position) => start.cmp(&touching_position),
|
||||
None => Ordering::Less,
|
||||
}
|
||||
}
|
||||
fn touching_end_comp<I, K>(end: I) -> impl FnMut(&K) -> Ordering
|
||||
where
|
||||
I: Ord + Copy + DiscreteFinite,
|
||||
K: FiniteRange<I>,
|
||||
{
|
||||
move |inner_range: &K| end.cmp(&inner_range.start().down().unwrap())
|
||||
move |inner_range: &K| match inner_range.start().down() {
|
||||
Some(touching_position) => end.cmp(&touching_position),
|
||||
None => Ordering::Greater,
|
||||
}
|
||||
}
|
||||
|
||||
/// A simple helper trait to make my implemtation nicer, if you
|
||||
@ -1834,7 +1840,7 @@ mod tests {
|
||||
.unwrap()
|
||||
.gaps(uu())
|
||||
.collect::<Vec<_>>(),
|
||||
[ui(i8::MIN), iu(i8::MAX)]
|
||||
[]
|
||||
);
|
||||
}
|
||||
fn assert_gaps<const N: usize>(
|
||||
@ -1907,6 +1913,7 @@ mod tests {
|
||||
Err(OverlapError),
|
||||
basic_slice(),
|
||||
);
|
||||
dbg!("hererere");
|
||||
assert_insert_merge_touching_if_values_equal(
|
||||
basic(),
|
||||
(ee(7, 10), false),
|
||||
@ -2127,7 +2134,7 @@ mod tests {
|
||||
// The definition of a cut is: A && NOT B
|
||||
for x in NUMBERS_DOMAIN {
|
||||
let base_contains = contains_point(base, *x);
|
||||
let cut_contains = contains_point(base, *x);
|
||||
let cut_contains = contains_point(cut, *x);
|
||||
|
||||
if cut_contains {
|
||||
on_left = false;
|
||||
|
@ -33,7 +33,7 @@ pub fn ii(x1: i8, x2: i8) -> FiniteBounds<i8> {
|
||||
}
|
||||
pub fn ie(x1: i8, x2: i8) -> FiniteBounds<i8> {
|
||||
FiniteBounds {
|
||||
start: x1.up().unwrap(),
|
||||
start: x1,
|
||||
end: x2.down().unwrap(),
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user