Clean up tests

This commit is contained in:
Vinzent Steinberg 2019-07-08 16:17:04 +02:00
parent 0890aee3fb
commit c9829a1279
14 changed files with 10 additions and 84 deletions

View File

@ -138,7 +138,7 @@ macro_rules! concatenate {
}
}
impl_from_iterator!($name);
$crate::impl_from_iterator!($name);
};
}

View File

@ -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")]
#[macro_use] extern crate serde_big_array;
@ -15,7 +5,7 @@ use core::iter::Iterator;
use rand::SeedableRng;
use rand_distr::Distribution;
use average::{Histogram, Merge};
use average::{Histogram, Merge, define_histogram, assert_almost_eq};
define_histogram!(hist10, 10);
define_histogram!(hist100, 100);

View File

@ -1,14 +1,8 @@
#![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 average::{Kurtosis, Estimate, Merge};
use average::{Kurtosis, Estimate, Merge, assert_almost_eq};
#[test]
fn trivial() {

View File

@ -1,10 +1,6 @@
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp))]
#[macro_use] extern crate average;
use average::{Estimate, Min, Max};
use average::{Estimate, Min, Max, concatenate};
concatenate!(MinMax, [Min, min], [Max, max]);

View File

@ -1,11 +1,5 @@
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
#[cfg(feature = "serde1")]
extern crate serde_json;
use core::iter::Iterator;
use average::{Max, Estimate, Merge};

View File

@ -1,14 +1,8 @@
#![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 average::{MeanWithError, Estimate, Merge};
use average::{MeanWithError, Estimate, Merge, assert_almost_eq};
#[test]
fn trivial() {

View File

@ -1,11 +1,5 @@
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
#[cfg(feature = "serde1")]
extern crate serde_json;
use core::iter::Iterator;
use average::{Min, Estimate, Merge};

View File

@ -1,14 +1,8 @@
#![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 average::{Moments4, Merge};
use average::{Moments4, Merge, assert_almost_eq};
#[test]
fn trivial() {

View File

@ -1,10 +1,7 @@
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
#[macro_use] extern crate average;
#[macro_use] extern crate proptest;
use core::iter::Iterator;
use average::Mean;

View File

@ -1,10 +1,5 @@
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
#[cfg(feature = "serde1")]
extern crate serde_json;
use average::{Estimate, Quantile};
use quantiles::ckms::CKMS;

View File

@ -1,13 +1,8 @@
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
#[macro_use] extern crate average;
use rand_distr;
use rand_distr::Distribution;
use average::{Kurtosis, Estimate};
use average::{Kurtosis, Estimate, assert_almost_eq};
#[test]
fn normal_distribution() {

View File

@ -1,14 +1,8 @@
#![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 average::{Skewness, Estimate, Merge};
use average::{Skewness, Estimate, Merge, assert_almost_eq};
#[test]
fn trivial() {

View File

@ -1,11 +1,6 @@
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
#[macro_use] extern crate average;
use stats;
use average::assert_almost_eq;
/// Create a random vector by sampling from a normal distribution.
fn initialize_vec(size: usize) -> Vec<f64> {

View File

@ -1,14 +1,8 @@
#![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 average::{WeightedMeanWithError, Merge};
use average::{WeightedMeanWithError, Merge, assert_almost_eq};
#[test]
fn trivial() {