forked from M-Labs/nalgebra
Fix tests.
This commit is contained in:
parent
8dbfbe10a5
commit
87a80c2de6
@ -13,7 +13,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||
impl<N $(, $param: ArrayLength<N>)*> AsRef<[N]> for $vecn<N $(, $param)*> {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &[N] {
|
||||
&self[.. self.len()]
|
||||
&self.at[.. self.len()]
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||
#[inline]
|
||||
fn as_mut(&mut self) -> &mut [N] {
|
||||
let len = self.len();
|
||||
&mut self[.. len]
|
||||
&mut self.at[.. len]
|
||||
}
|
||||
}
|
||||
|
||||
|
27
tests/vec.rs
27
tests/vec.rs
@ -4,7 +4,7 @@ extern crate nalgebra as na;
|
||||
|
||||
use rand::random;
|
||||
use typenum::U10;
|
||||
use na::{VecN, Vec0, Vec1, Vec2, Vec3, Vec4, Vec5, Vec6, Mat3, Rot2, Rot3, Iterable, IterableMut};
|
||||
use na::{VecN, Vec1, Vec2, Vec3, Vec4, Vec5, Vec6, Mat3, Rot2, Rot3, Iterable, IterableMut};
|
||||
|
||||
macro_rules! test_iterator_impl(
|
||||
($t: ty, $n: ty) => (
|
||||
@ -112,11 +112,6 @@ fn test_cross_vec3() {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_commut_dot_vec0() {
|
||||
test_commut_dot_impl!(Vec0<f64>);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_commut_dot_vec1() {
|
||||
test_commut_dot_impl!(Vec1<f64>);
|
||||
@ -147,11 +142,6 @@ fn test_commut_dot_vec6() {
|
||||
test_commut_dot_impl!(Vec6<f64>);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_basis_vec0() {
|
||||
test_basis_impl!(Vec0<f64>);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_basis_vec1() {
|
||||
test_basis_impl!(Vec1<f64>);
|
||||
@ -182,11 +172,6 @@ fn test_basis_vec6() {
|
||||
test_basis_impl!(Vec6<f64>);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_subspace_basis_vec0() {
|
||||
test_subspace_basis_impl!(Vec0<f64>);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_subspace_basis_vec1() {
|
||||
test_subspace_basis_impl!(Vec1<f64>);
|
||||
@ -217,11 +202,6 @@ fn test_subspace_basis_vec6() {
|
||||
test_subspace_basis_impl!(Vec6<f64>);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_scalar_op_vec0() {
|
||||
test_scalar_op_impl!(Vec0<f64>, f64);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_scalar_op_vec1() {
|
||||
test_scalar_op_impl!(Vec1<f64>, f64);
|
||||
@ -252,11 +232,6 @@ fn test_scalar_op_vec6() {
|
||||
test_scalar_op_impl!(Vec6<f64>, f64);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_iterator_vec0() {
|
||||
test_iterator_impl!(Vec0<f64>, f64);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_iterator_vec1() {
|
||||
test_iterator_impl!(Vec1<f64>, f64);
|
||||
|
Loading…
Reference in New Issue
Block a user