Clean up tests
This commit is contained in:
parent
0890aee3fb
commit
c9829a1279
@ -138,7 +138,7 @@ macro_rules! concatenate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_from_iterator!($name);
|
$crate::impl_from_iterator!($name);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,3 @@
|
|||||||
#[macro_use] extern crate average;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
use rand_xoshiro;
|
|
||||||
use rand_distr;
|
|
||||||
#[cfg(feature = "serde1")]
|
|
||||||
#[macro_use] extern crate serde_derive;
|
|
||||||
#[cfg(feature = "serde1")]
|
|
||||||
extern crate serde_json;
|
|
||||||
#[cfg(feature = "serde1")]
|
#[cfg(feature = "serde1")]
|
||||||
#[macro_use] extern crate serde_big_array;
|
#[macro_use] extern crate serde_big_array;
|
||||||
|
|
||||||
@ -15,7 +5,7 @@ use core::iter::Iterator;
|
|||||||
use rand::SeedableRng;
|
use rand::SeedableRng;
|
||||||
use rand_distr::Distribution;
|
use rand_distr::Distribution;
|
||||||
|
|
||||||
use average::{Histogram, Merge};
|
use average::{Histogram, Merge, define_histogram, assert_almost_eq};
|
||||||
|
|
||||||
define_histogram!(hist10, 10);
|
define_histogram!(hist10, 10);
|
||||||
define_histogram!(hist100, 100);
|
define_histogram!(hist100, 100);
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
#[macro_use] extern crate average;
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "serde1")]
|
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
use core::iter::Iterator;
|
use core::iter::Iterator;
|
||||||
|
|
||||||
use average::{Kurtosis, Estimate, Merge};
|
use average::{Kurtosis, Estimate, Merge, assert_almost_eq};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn trivial() {
|
fn trivial() {
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp))]
|
||||||
|
|
||||||
#[macro_use] extern crate average;
|
use average::{Estimate, Min, Max, concatenate};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
use average::{Estimate, Min, Max};
|
|
||||||
|
|
||||||
concatenate!(MinMax, [Min, min], [Max, max]);
|
concatenate!(MinMax, [Min, min], [Max, max]);
|
||||||
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "serde1")]
|
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
use core::iter::Iterator;
|
use core::iter::Iterator;
|
||||||
|
|
||||||
use average::{Max, Estimate, Merge};
|
use average::{Max, Estimate, Merge};
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
#[macro_use] extern crate average;
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "serde")]
|
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
use core::iter::Iterator;
|
use core::iter::Iterator;
|
||||||
|
|
||||||
use average::{MeanWithError, Estimate, Merge};
|
use average::{MeanWithError, Estimate, Merge, assert_almost_eq};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn trivial() {
|
fn trivial() {
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "serde1")]
|
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
use core::iter::Iterator;
|
use core::iter::Iterator;
|
||||||
|
|
||||||
use average::{Min, Estimate, Merge};
|
use average::{Min, Estimate, Merge};
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
#[macro_use] extern crate average;
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "serde1")]
|
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
use core::iter::Iterator;
|
use core::iter::Iterator;
|
||||||
|
|
||||||
use average::{Moments4, Merge};
|
use average::{Moments4, Merge, assert_almost_eq};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn trivial() {
|
fn trivial() {
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
#[macro_use] extern crate average;
|
|
||||||
#[macro_use] extern crate proptest;
|
#[macro_use] extern crate proptest;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
use core::iter::Iterator;
|
use core::iter::Iterator;
|
||||||
|
|
||||||
use average::Mean;
|
use average::Mean;
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "serde1")]
|
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
|
|
||||||
use average::{Estimate, Quantile};
|
use average::{Estimate, Quantile};
|
||||||
use quantiles::ckms::CKMS;
|
use quantiles::ckms::CKMS;
|
||||||
|
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
#[macro_use] extern crate average;
|
|
||||||
|
|
||||||
|
|
||||||
use rand_distr;
|
|
||||||
|
|
||||||
use rand_distr::Distribution;
|
use rand_distr::Distribution;
|
||||||
|
|
||||||
use average::{Kurtosis, Estimate};
|
use average::{Kurtosis, Estimate, assert_almost_eq};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn normal_distribution() {
|
fn normal_distribution() {
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
#[macro_use] extern crate average;
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "serde1")]
|
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
use core::iter::Iterator;
|
use core::iter::Iterator;
|
||||||
|
|
||||||
use average::{Skewness, Estimate, Merge};
|
use average::{Skewness, Estimate, Merge, assert_almost_eq};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn trivial() {
|
fn trivial() {
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
#[macro_use] extern crate average;
|
use average::assert_almost_eq;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
use stats;
|
|
||||||
|
|
||||||
/// Create a random vector by sampling from a normal distribution.
|
/// Create a random vector by sampling from a normal distribution.
|
||||||
fn initialize_vec(size: usize) -> Vec<f64> {
|
fn initialize_vec(size: usize) -> Vec<f64> {
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
#[macro_use] extern crate average;
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "serde1")]
|
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
use core::iter::Iterator;
|
use core::iter::Iterator;
|
||||||
|
|
||||||
use average::{WeightedMeanWithError, Merge};
|
use average::{WeightedMeanWithError, Merge, assert_almost_eq};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn trivial() {
|
fn trivial() {
|
||||||
|
Loading…
Reference in New Issue
Block a user