nalgebra-sparse: Move slow tests and imports into 'slow' child module

This way it's easier to prevent accidental unused imports when
running tests without the slow-tests feature.
This commit is contained in:
Andreas Longva 2020-11-23 10:16:18 +01:00
parent 54329146c9
commit f20e764edc

View File

@ -1,20 +1,24 @@
#[test]
#[ignore]
fn coo_no_duplicates_generates_admissible_matrices() {
//TODO
}
#[cfg(feature = "slow-tests")]
mod slow {
use nalgebra_sparse::proptest::{coo_with_duplicates, coo_no_duplicates}; use nalgebra_sparse::proptest::{coo_with_duplicates, coo_no_duplicates};
use nalgebra::DMatrix; use nalgebra::DMatrix;
use proptest::prelude::*; use proptest::test_runner::TestRunner;
use proptest::strategy::ValueTree;
use itertools::Itertools; use itertools::Itertools;
use proptest::prelude::*;
use std::collections::HashSet; use std::collections::HashSet;
use std::iter::repeat; use std::iter::repeat;
#[cfg(feature = "slow-tests")]
use {
proptest::test_runner::TestRunner,
proptest::strategy::ValueTree
};
use std::ops::RangeInclusive; use std::ops::RangeInclusive;
#[cfg(feature = "slow-tests")]
fn generate_all_possible_matrices(value_range: RangeInclusive<i32>, fn generate_all_possible_matrices(value_range: RangeInclusive<i32>,
rows_range: RangeInclusive<usize>, rows_range: RangeInclusive<usize>,
cols_range: RangeInclusive<usize>) cols_range: RangeInclusive<usize>)
@ -127,8 +131,4 @@ fn coo_with_duplicates_samples_all_admissible_outputs() {
// is contained in the set of visited matrices // is contained in the set of visited matrices
assert!(all_combinations.is_subset(&visited_combinations)); assert!(all_combinations.is_subset(&visited_combinations));
} }
#[test]
fn coo_no_duplicates_generates_admissible_matrices() {
} }