Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
cpmech committed Jun 26, 2024
1 parent 164dcb2 commit 30f80cf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions russell_lab/src/algo/interp_chebyshev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,17 @@ mod tests {
}
}

#[test]
fn new_adapt_uu_captures_errors() {
let uu = [];
let nn_max = 4;
let tol = 1e-7;
assert_eq!(
InterpChebyshev::new_adapt_uu(nn_max, tol, 0.0, 1.0, &uu).err(),
Some("the number of points = uu.len() must be ≥ 1")
);
}

#[test]
fn new_adapt_uu_works() {
let data_generators = [
Expand Down

0 comments on commit 30f80cf

Please sign in to comment.