Designate exhaustive matrix proptest as slow-tests
The slow-tests feature flag is intended to be used for tests that take substantially more time to run than other unit tests.
This commit is contained in:
parent
cbef37ed9c
commit
f909638bf4
@ -57,10 +57,10 @@ jobs:
|
||||
- checkout
|
||||
- run:
|
||||
name: test
|
||||
command: cargo test --features arbitrary --features serde-serialize --features abomonation-serialize --features sparse --features debug --features io --features compare --features libm --features proptest
|
||||
command: cargo test --features arbitrary --features serde-serialize --features abomonation-serialize --features sparse --features debug --features io --features compare --features libm --features proptest --features slow-tests
|
||||
- run:
|
||||
name: test nalgebra-glm
|
||||
command: cargo test -p nalgebra-glm --features arbitrary --features serde-serialize --features abomonation-serialize --features sparse --features debug --features io --features compare --features libm
|
||||
command: cargo test -p nalgebra-glm --features arbitrary --features serde-serialize --features abomonation-serialize --features sparse --features debug --features io --features compare --features libm --features slow-tests
|
||||
build-wasm:
|
||||
executor: rust-executor
|
||||
steps:
|
||||
|
@ -34,6 +34,9 @@ compare = [ "matrixcompare-core" ]
|
||||
libm = [ "simba/libm" ]
|
||||
libm-force = [ "simba/libm_force" ]
|
||||
|
||||
# This feature is only used for tests, and enables tests that require more time to run
|
||||
slow-tests = []
|
||||
|
||||
|
||||
[dependencies]
|
||||
typenum = "1.12"
|
||||
|
@ -5,9 +5,13 @@ use nalgebra::{DMatrix, DVector, Dim, Matrix3, MatrixMN, Vector3};
|
||||
use proptest::prelude::*;
|
||||
use proptest::strategy::ValueTree;
|
||||
use proptest::test_runner::TestRunner;
|
||||
use itertools::Itertools;
|
||||
use std::iter::repeat;
|
||||
use std::collections::HashSet;
|
||||
|
||||
#[cfg(feature = "slow-tests")]
|
||||
use {
|
||||
itertools::Itertools,
|
||||
std::iter::repeat,
|
||||
std::collections::HashSet,
|
||||
};
|
||||
|
||||
/// Generate a proptest that tests that all matrices generated with the
|
||||
/// provided rows and columns conform to the constraints defined by the
|
||||
@ -92,6 +96,7 @@ proptest! {
|
||||
fn ensure_arbitrary_test_compiles_dvector(_: DVector<i32>) {}
|
||||
}
|
||||
|
||||
#[cfg(feature = "slow-tests")]
|
||||
#[test]
|
||||
fn matrix_samples_all_possible_outputs() {
|
||||
// Test that the proptest generation covers all possible outputs for a small space of inputs
|
||||
|
Loading…
Reference in New Issue
Block a user