From 5b2e3833201c632d60c70eb0d6b7197a7a62d472 Mon Sep 17 00:00:00 2001 From: Eduard Bopp Date: Wed, 17 Jan 2018 15:47:28 +0100 Subject: [PATCH] Let the test suite run with no features --- .travis.yml | 1 + tests/core/conversion.rs | 2 +- tests/core/serde.rs | 2 ++ tests/geometry/isometry.rs | 1 + tests/geometry/point.rs | 1 + tests/geometry/quaternion.rs | 1 + tests/geometry/rotation.rs | 1 + tests/geometry/similarity.rs | 1 + tests/geometry/unit_complex.rs | 1 + tests/linalg/cholesky.rs | 3 ++- 10 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index add11426..52a8a75a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,7 @@ script: - cargo build --verbose --features mint - cargo build --verbose --features serde-serialize - cargo build --verbose --features abomonation-serialize + - cargo test --verbose - cargo test --verbose --features "debug arbitrary mint serde-serialize abomonation-serialize" - cd nalgebra-lapack; cargo test --verbose diff --git a/tests/core/conversion.rs b/tests/core/conversion.rs index d2dfbcea..175c6f2b 100644 --- a/tests/core/conversion.rs +++ b/tests/core/conversion.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "arbitrary")] use alga::linear::Transformation; use na::{ self, @@ -13,7 +14,6 @@ use na::{ Projective3, Transform3, Rotation3, UnitQuaternion}; -#[cfg(feature = "arbitrary")] quickcheck!{ fn translation_conversion(t: Translation3, v: Vector3, p: Point3) -> bool { let iso: Isometry3 = na::convert(t); diff --git a/tests/core/serde.rs b/tests/core/serde.rs index b0411eb8..14456eac 100644 --- a/tests/core/serde.rs +++ b/tests/core/serde.rs @@ -1,3 +1,5 @@ +#![cfg(feature = "serde-serialize")] + use serde_json; use rand; use na::{ diff --git a/tests/geometry/isometry.rs b/tests/geometry/isometry.rs index 2ad79c60..f7226bbf 100644 --- a/tests/geometry/isometry.rs +++ b/tests/geometry/isometry.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "arbitrary")] #![allow(non_snake_case)] use alga::linear::{Transformation, ProjectiveTransformation}; diff --git a/tests/geometry/point.rs b/tests/geometry/point.rs index 9c813819..1b673f92 100644 --- a/tests/geometry/point.rs +++ b/tests/geometry/point.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "arbitrary")] use num::Zero; use na::{Point3, Vector3, Vector4}; diff --git a/tests/geometry/quaternion.rs b/tests/geometry/quaternion.rs index c3399399..927835e2 100644 --- a/tests/geometry/quaternion.rs +++ b/tests/geometry/quaternion.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "arbitrary")] #![allow(non_snake_case)] use na::{Unit, UnitQuaternion, Quaternion, Vector3, Point3, Rotation3}; diff --git a/tests/geometry/rotation.rs b/tests/geometry/rotation.rs index b90ab259..a6e6daf6 100644 --- a/tests/geometry/rotation.rs +++ b/tests/geometry/rotation.rs @@ -18,6 +18,7 @@ fn angle_3() { assert_eq!(a.angle(&b), 0.0); } +#[cfg(feature = "arbitrary")] quickcheck!( /* * diff --git a/tests/geometry/similarity.rs b/tests/geometry/similarity.rs index ef4fd4c2..2364e992 100644 --- a/tests/geometry/similarity.rs +++ b/tests/geometry/similarity.rs @@ -3,6 +3,7 @@ use alga::linear::{Transformation, ProjectiveTransformation}; use na::{Vector3, Point3, Similarity3, Translation3, Isometry3, UnitQuaternion}; +#[cfg(feature = "arbitrary")] quickcheck!( fn inverse_is_identity(i: Similarity3, p: Point3, v: Vector3) -> bool { let ii = i.inverse(); diff --git a/tests/geometry/unit_complex.rs b/tests/geometry/unit_complex.rs index a5147690..420b03c1 100644 --- a/tests/geometry/unit_complex.rs +++ b/tests/geometry/unit_complex.rs @@ -3,6 +3,7 @@ use na::{Unit, UnitComplex, Vector2, Point2, Rotation2}; +#[cfg(feature = "arbitrary")] quickcheck!( /* diff --git a/tests/linalg/cholesky.rs b/tests/linalg/cholesky.rs index 18e577b9..82449477 100644 --- a/tests/linalg/cholesky.rs +++ b/tests/linalg/cholesky.rs @@ -1,9 +1,10 @@ +#![cfg(feature = "arbitrary")] + use std::cmp; use na::{DMatrix, Matrix4x3, DVector, Vector4}; use na::dimension::U4; use na::debug::RandomSDP; -#[cfg(feature = "arbitrary")] quickcheck! { fn cholesky(m: RandomSDP) -> bool { let mut m = m.unwrap();