Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/airy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,17 @@ pub fn airyzo(nt: u32, kf: AiryKind) -> (f64, f64, f64, f64) {
#[cfg(test)]
mod tests {
use super::*;
use crate::xsref;
use crate::testing;
use num_complex::{Complex, c64};

#[test]
fn test_airy_f64() {
xsref::test::<(f64, f64, f64, f64), _>("airy", "d-d_d_d_d", |x: &[f64]| airy(x[0]));
testing::test::<(f64, f64, f64, f64), _>("airy", "d-d_d_d_d", |x: &[f64]| airy(x[0]));
}

#[test]
fn test_airy_c64() {
xsref::test::<(Complex<f64>, Complex<f64>, Complex<f64>, Complex<f64>), _>(
testing::test::<(Complex<f64>, Complex<f64>, Complex<f64>, Complex<f64>), _>(
"airy",
"cd-cd_cd_cd_cd",
|x: &[f64]| airy(c64(x[0], x[1])),
Expand All @@ -236,12 +236,12 @@ mod tests {

#[test]
fn test_airye_f64() {
xsref::test::<(f64, f64, f64, f64), _>("airye", "d-d_d_d_d", |x: &[f64]| airye(x[0]));
testing::test::<(f64, f64, f64, f64), _>("airye", "d-d_d_d_d", |x: &[f64]| airye(x[0]));
}

#[test]
fn test_airye_c64() {
xsref::test::<(Complex<f64>, Complex<f64>, Complex<f64>, Complex<f64>), _>(
testing::test::<(Complex<f64>, Complex<f64>, Complex<f64>, Complex<f64>), _>(
"airye",
"cd-cd_cd_cd_cd",
|x: &[f64]| airye(c64(x[0], x[1])),
Expand All @@ -250,6 +250,6 @@ mod tests {

#[test]
fn test_itairy() {
xsref::test::<(f64, f64, f64, f64), _>("itairy", "d-d_d_d_d", |x: &[f64]| itairy(x[0]));
testing::test::<(f64, f64, f64, f64), _>("itairy", "d-d_d_d_d", |x: &[f64]| itairy(x[0]));
}
}
4 changes: 2 additions & 2 deletions src/alg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ pub fn cbrt(x: f64) -> f64 {
#[cfg(test)]
mod tests {
use super::*;
use crate::xsref;
use crate::testing;

#[test]
fn test_cbrt() {
xsref::test::<f64, _>("cbrt", "d-d", |x: &[f64]| cbrt(x[0]));
testing::test::<f64, _>("cbrt", "d-d", |x: &[f64]| cbrt(x[0]));
}
}
76 changes: 38 additions & 38 deletions src/bessel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,45 +234,45 @@ pub fn it2i0k0(x: f64) -> (f64, f64) {
#[cfg(test)]
mod tests {
use super::*;
use crate::xsref;
use crate::testing;
use num_complex::{Complex, c64};

// bessel j

#[test]
fn test_cyl_bessel_j0() {
xsref::test::<f64, _>("cyl_bessel_j0", "d-d", |x: &[f64]| cyl_bessel_j0(x[0]));
testing::test::<f64, _>("cyl_bessel_j0", "d-d", |x: &[f64]| cyl_bessel_j0(x[0]));
}

#[test]
fn test_cyl_bessel_j1() {
xsref::test::<f64, _>("cyl_bessel_j1", "d-d", |x: &[f64]| cyl_bessel_j1(x[0]));
testing::test::<f64, _>("cyl_bessel_j1", "d-d", |x: &[f64]| cyl_bessel_j1(x[0]));
}

#[test]
fn test_cyl_bessel_j_f64() {
xsref::test::<f64, _>("cyl_bessel_j", "d_d-d", |x: &[f64]| {
testing::test::<f64, _>("cyl_bessel_j", "d_d-d", |x: &[f64]| {
cyl_bessel_j(x[0], x[1])
});
}

#[test]
fn test_cyl_bessel_j_c64() {
xsref::test::<Complex<f64>, _>("cyl_bessel_j", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_bessel_j", "d_cd-cd", |x: &[f64]| {
cyl_bessel_j(x[0], c64(x[1], x[2]))
});
}

#[test]
fn test_cyl_bessel_je_f64() {
xsref::test::<f64, _>("cyl_bessel_je", "d_d-d", |x: &[f64]| {
testing::test::<f64, _>("cyl_bessel_je", "d_d-d", |x: &[f64]| {
cyl_bessel_je(x[0], x[1])
});
}

#[test]
fn test_cyl_bessel_je_c64() {
xsref::test::<Complex<f64>, _>("cyl_bessel_je", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_bessel_je", "d_cd-cd", |x: &[f64]| {
cyl_bessel_je(x[0], c64(x[1], x[2]))
});
}
Expand All @@ -281,38 +281,38 @@ mod tests {

#[test]
fn test_cyl_bessel_y0() {
xsref::test::<f64, _>("cyl_bessel_y0", "d-d", |x: &[f64]| cyl_bessel_y0(x[0]));
testing::test::<f64, _>("cyl_bessel_y0", "d-d", |x: &[f64]| cyl_bessel_y0(x[0]));
}

#[test]
fn test_cyl_bessel_y1() {
xsref::test::<f64, _>("cyl_bessel_y1", "d-d", |x: &[f64]| cyl_bessel_y1(x[0]));
testing::test::<f64, _>("cyl_bessel_y1", "d-d", |x: &[f64]| cyl_bessel_y1(x[0]));
}

#[test]
fn test_cyl_bessel_y_f64() {
xsref::test::<f64, _>("cyl_bessel_y", "d_d-d", |x: &[f64]| {
testing::test::<f64, _>("cyl_bessel_y", "d_d-d", |x: &[f64]| {
cyl_bessel_y(x[0], x[1])
});
}

#[test]
fn test_cyl_bessel_y_c64() {
xsref::test::<Complex<f64>, _>("cyl_bessel_y", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_bessel_y", "d_cd-cd", |x: &[f64]| {
cyl_bessel_y(x[0], c64(x[1], x[2]))
});
}

#[test]
fn test_cyl_bessel_ye_f64() {
xsref::test::<f64, _>("cyl_bessel_ye", "d_d-d", |x: &[f64]| {
testing::test::<f64, _>("cyl_bessel_ye", "d_d-d", |x: &[f64]| {
cyl_bessel_ye(x[0], x[1])
});
}

#[test]
fn test_cyl_bessel_ye_c64() {
xsref::test::<Complex<f64>, _>("cyl_bessel_ye", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_bessel_ye", "d_cd-cd", |x: &[f64]| {
cyl_bessel_ye(x[0], c64(x[1], x[2]))
});
}
Expand All @@ -321,48 +321,48 @@ mod tests {

#[test]
fn test_cyl_bessel_i0() {
xsref::test::<f64, _>("cyl_bessel_i0", "d-d", |x: &[f64]| cyl_bessel_i0(x[0]));
testing::test::<f64, _>("cyl_bessel_i0", "d-d", |x: &[f64]| cyl_bessel_i0(x[0]));
}

#[test]
fn test_cyl_bessel_i0e() {
xsref::test::<f64, _>("cyl_bessel_i0e", "d-d", |x: &[f64]| cyl_bessel_i0e(x[0]));
testing::test::<f64, _>("cyl_bessel_i0e", "d-d", |x: &[f64]| cyl_bessel_i0e(x[0]));
}

#[test]
fn test_cyl_bessel_i1() {
xsref::test::<f64, _>("cyl_bessel_i1", "d-d", |x: &[f64]| cyl_bessel_i1(x[0]));
testing::test::<f64, _>("cyl_bessel_i1", "d-d", |x: &[f64]| cyl_bessel_i1(x[0]));
}

#[test]
fn test_cyl_bessel_i1e() {
xsref::test::<f64, _>("cyl_bessel_i1e", "d-d", |x: &[f64]| cyl_bessel_i1e(x[0]));
testing::test::<f64, _>("cyl_bessel_i1e", "d-d", |x: &[f64]| cyl_bessel_i1e(x[0]));
}

#[test]
fn test_cyl_bessel_i_f64() {
xsref::test::<f64, _>("cyl_bessel_i", "d_d-d", |x: &[f64]| {
testing::test::<f64, _>("cyl_bessel_i", "d_d-d", |x: &[f64]| {
cyl_bessel_i(x[0], x[1])
});
}

#[test]
fn test_cyl_bessel_i_c64() {
xsref::test::<Complex<f64>, _>("cyl_bessel_i", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_bessel_i", "d_cd-cd", |x: &[f64]| {
cyl_bessel_i(x[0], c64(x[1], x[2]))
});
}

#[test]
fn test_cyl_bessel_ie_f64() {
xsref::test::<f64, _>("cyl_bessel_ie", "d_d-d", |x: &[f64]| {
testing::test::<f64, _>("cyl_bessel_ie", "d_d-d", |x: &[f64]| {
cyl_bessel_ie(x[0], x[1])
});
}

#[test]
fn test_cyl_bessel_ie_c64() {
xsref::test::<Complex<f64>, _>("cyl_bessel_ie", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_bessel_ie", "d_cd-cd", |x: &[f64]| {
cyl_bessel_ie(x[0], c64(x[1], x[2]))
});
}
Expand All @@ -371,48 +371,48 @@ mod tests {

#[test]
fn test_cyl_bessel_k0() {
xsref::test::<f64, _>("cyl_bessel_k0", "d-d", |x: &[f64]| cyl_bessel_k0(x[0]));
testing::test::<f64, _>("cyl_bessel_k0", "d-d", |x: &[f64]| cyl_bessel_k0(x[0]));
}

#[test]
fn test_cyl_bessel_k0e() {
xsref::test::<f64, _>("cyl_bessel_k0e", "d-d", |x: &[f64]| cyl_bessel_k0e(x[0]));
testing::test::<f64, _>("cyl_bessel_k0e", "d-d", |x: &[f64]| cyl_bessel_k0e(x[0]));
}

#[test]
fn test_cyl_bessel_k1() {
xsref::test::<f64, _>("cyl_bessel_k1", "d-d", |x: &[f64]| cyl_bessel_k1(x[0]));
testing::test::<f64, _>("cyl_bessel_k1", "d-d", |x: &[f64]| cyl_bessel_k1(x[0]));
}

#[test]
fn test_cyl_bessel_k1e() {
xsref::test::<f64, _>("cyl_bessel_k1e", "d-d", |x: &[f64]| cyl_bessel_k1e(x[0]));
testing::test::<f64, _>("cyl_bessel_k1e", "d-d", |x: &[f64]| cyl_bessel_k1e(x[0]));
}

#[test]
fn test_cyl_bessel_k_f64() {
xsref::test::<f64, _>("cyl_bessel_k", "d_d-d", |x: &[f64]| {
testing::test::<f64, _>("cyl_bessel_k", "d_d-d", |x: &[f64]| {
cyl_bessel_k(x[0], x[1])
});
}

#[test]
fn test_cyl_bessel_k_c64() {
xsref::test::<Complex<f64>, _>("cyl_bessel_k", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_bessel_k", "d_cd-cd", |x: &[f64]| {
cyl_bessel_k(x[0], c64(x[1], x[2]))
});
}

#[test]
fn test_cyl_bessel_ke_f64() {
xsref::test::<f64, _>("cyl_bessel_ke", "d_d-d", |x: &[f64]| {
testing::test::<f64, _>("cyl_bessel_ke", "d_d-d", |x: &[f64]| {
cyl_bessel_ke(x[0], x[1])
});
}

#[test]
fn test_cyl_bessel_ke_c64() {
xsref::test::<Complex<f64>, _>("cyl_bessel_ke", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_bessel_ke", "d_cd-cd", |x: &[f64]| {
cyl_bessel_ke(x[0], c64(x[1], x[2]))
});
}
Expand All @@ -421,28 +421,28 @@ mod tests {

#[test]
fn test_cyl_hankel_1_c64() {
xsref::test::<Complex<f64>, _>("cyl_hankel_1", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_hankel_1", "d_cd-cd", |x: &[f64]| {
cyl_hankel_1(x[0], c64(x[1], x[2]))
});
}

#[test]
fn test_cyl_hankel_1e_c64() {
xsref::test::<Complex<f64>, _>("cyl_hankel_1e", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_hankel_1e", "d_cd-cd", |x: &[f64]| {
cyl_hankel_1e(x[0], c64(x[1], x[2]))
});
}

#[test]
fn test_cyl_hankel_2_c64() {
xsref::test::<Complex<f64>, _>("cyl_hankel_2", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_hankel_2", "d_cd-cd", |x: &[f64]| {
cyl_hankel_2(x[0], c64(x[1], x[2]))
});
}

#[test]
fn test_cyl_hankel_2e_c64() {
xsref::test::<Complex<f64>, _>("cyl_hankel_2e", "d_cd-cd", |x: &[f64]| {
testing::test::<Complex<f64>, _>("cyl_hankel_2e", "d_cd-cd", |x: &[f64]| {
cyl_hankel_2e(x[0], c64(x[1], x[2]))
});
}
Expand All @@ -451,7 +451,7 @@ mod tests {

#[test]
fn test_besselpoly_f64() {
xsref::test::<f64, _>("besselpoly", "d_d_d-d", |x: &[f64]| {
testing::test::<f64, _>("besselpoly", "d_d_d-d", |x: &[f64]| {
besselpoly(x[0], x[1], x[2])
});
}
Expand All @@ -460,21 +460,21 @@ mod tests {

#[test]
fn test_it1j0y0_f64() {
xsref::test::<(f64, f64), _>("it1j0y0", "d-d_d", |x: &[f64]| it1j0y0(x[0]));
testing::test::<(f64, f64), _>("it1j0y0", "d-d_d", |x: &[f64]| it1j0y0(x[0]));
}

#[test]
fn test_it2j0y0_f64() {
xsref::test::<(f64, f64), _>("it2j0y0", "d-d_d", |x: &[f64]| it2j0y0(x[0]));
testing::test::<(f64, f64), _>("it2j0y0", "d-d_d", |x: &[f64]| it2j0y0(x[0]));
}

#[test]
fn test_it1i0k0_f64() {
xsref::test::<(f64, f64), _>("it1i0k0", "d-d_d", |x: &[f64]| it1i0k0(x[0]));
testing::test::<(f64, f64), _>("it1i0k0", "d-d_d", |x: &[f64]| it1i0k0(x[0]));
}

#[test]
fn test_it2i0k0_f64() {
xsref::test::<(f64, f64), _>("it2i0k0", "d-d_d", |x: &[f64]| it2i0k0(x[0]));
testing::test::<(f64, f64), _>("it2i0k0", "d-d_d", |x: &[f64]| it2i0k0(x[0]));
}
}
6 changes: 3 additions & 3 deletions src/beta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ xsf_impl!(betaln, (a: f64, b: f64), "Natural log of `|beta|`");
#[cfg(test)]
mod tests {
use super::*;
use crate::xsref;
use crate::testing;

#[test]
fn test_beta() {
xsref::test::<f64, _>("beta", "d_d-d", |x: &[f64]| beta(x[0], x[1]));
testing::test::<f64, _>("beta", "d_d-d", |x: &[f64]| beta(x[0], x[1]));
}

#[test]
fn test_betaln() {
xsref::test::<f64, _>("betaln", "d_d-d", |x: &[f64]| betaln(x[0], x[1]));
testing::test::<f64, _>("betaln", "d_d-d", |x: &[f64]| betaln(x[0], x[1]));
}
}
4 changes: 2 additions & 2 deletions src/binom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ xsf_impl!(binom, (n: f64, k: f64), "Binomial coefficient");
#[cfg(test)]
mod tests {
use super::*;
use crate::xsref;
use crate::testing;

#[test]
fn test_binom() {
xsref::test::<f64, _>("binom", "d_d-d", |x: &[f64]| binom(x[0], x[1]));
testing::test::<f64, _>("binom", "d_d-d", |x: &[f64]| binom(x[0], x[1]));
}
}
4 changes: 2 additions & 2 deletions src/cdflib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ xsf_impl!(gdtrib, (a: f64, p: f64, x: f64), "Inverse of `p = gdtr(a, b, x)` with
#[cfg(test)]
mod tests {
use super::*;
use crate::xsref;
use crate::testing;

#[test]
fn test_gdtrib() {
xsref::test::<f64, _>("gdtrib", "d_d_d-d", |x: &[f64]| gdtrib(x[0], x[1], x[2]));
testing::test::<f64, _>("gdtrib", "d_d_d-d", |x: &[f64]| gdtrib(x[0], x[1], x[2]));
}
}
Loading
Loading