//! Demonstrate the output of `assert_best_fit()` when it fails the assertion.


use bigoish::{N, assert_best_fit, growing_inputs};

fn sort(mut v: Vec<i64>) -> Vec<i64> {
    v.sort();
    v
}

fn make_vec(n: usize) -> Vec<i64> {
    std::iter::repeat_with(|| fastrand::i64(..))
        .take(n)
        .collect()
}

fn main() {
    // This will fail; Rust's built-in sort is not O(n).
    assert_best_fit(N, sort, growing_inputs(100, make_vec, 20));
}
