use super::{super::assert::AssertionError, Interpolate1D, LinearInterpolation, Vector};
use crate::math::assert::Assert;
#[test]
fn line() -> Result<(), AssertionError> {
let x = Vector::from([0.324, 0.745]);
let xp = Vector::from([0.0, 1.0]);
let linear_function = |x: &Vector| x * 2.3;
let fp = linear_function(&xp);
let f = LinearInterpolation::interpolate_1d(&x, &xp, &fp);
Assert::eq(linear_function(&x), &f)
}