~dkellner/chronofold

fc72155feba6a111e367e9a19e1918b777ff2ae7 — Dominik Kellner 9 months ago 83c1db2 main
Address Clippy warnings in tests
3 files changed, 5 insertions(+), 7 deletions(-)

M tests/api.rs
M tests/corner_cases.rs
M tests/version.rs
M tests/api.rs => tests/api.rs +2 -2
@@ 138,8 138,8 @@ fn splice() {
fn assert_elements_eq<I, T, F, G>(initial_values: I, mutate_vec: F, mutate_chronofold: G)
where
    I: Iterator<Item = T>,
    F: FnOnce(&mut Vec<T>) -> (),
    G: FnOnce(&mut Session<u8, T>) -> (),
    F: FnOnce(&mut Vec<T>),
    G: FnOnce(&mut Session<u8, T>),
    T: PartialEq + Clone + std::fmt::Debug,
{
    let mut vec: Vec<T> = initial_values.collect();

M tests/corner_cases.rs => tests/corner_cases.rs +2 -2
@@ 110,8 110,8 @@ fn insert_referencing_deleted_element() {

fn assert_concurrent_eq<F, G>(expected: &str, initial: &str, mutate_left: F, mutate_right: G)
where
    F: FnOnce(&mut Session<u8, char>) -> (),
    G: FnOnce(&mut Session<u8, char>) -> (),
    F: FnOnce(&mut Session<u8, char>),
    G: FnOnce(&mut Session<u8, char>),
{
    let mut cfold_left = Chronofold::<u8, char>::default();
    cfold_left.session(1).extend(initial.chars());

M tests/version.rs => tests/version.rs +1 -3
@@ 10,9 10,7 @@ fn partial_order() {
    assert!(v(vec![t(0, 1)]) < v(vec![t(1, 1)]));
    assert!(v(vec![t(1, 1)]) > v(vec![t(0, 1)]));

    assert!(!(v(vec![t(0, 1)]) == v(vec![t(0, 2)])));
    assert!(!(v(vec![t(0, 1)]) < v(vec![t(0, 2)])));
    assert!(!(v(vec![t(0, 1)]) > v(vec![t(0, 2)])));
    assert_eq!(v(vec![t(0, 1)]).partial_cmp(&v(vec![t(0, 2)])), None);
}

#[test]