Fix Column implementation generating an ICE.

This commit is contained in:
Sébastien Crozet 2013-06-29 15:19:21 +00:00
parent d3bed841f8
commit 429bcbf9c3
2 changed files with 13 additions and 1 deletions

View File

@ -84,7 +84,7 @@ macro_rules! column_impl(
if i == Dim::dim::<$t<N>>()
{ break }
self.at((i, col)) = copy *e;
self.set((i, col), copy *e);
}
}

View File

@ -9,6 +9,10 @@ use traits::inv::Inv;
#[test]
use traits::rotation::{Rotation, Rotatable};
#[test]
use traits::indexable::Indexable;
#[test]
use traits::transpose::Transpose;
#[test]
use vec::Vec1;
#[test]
use mat::{Mat1, Mat2, Mat3};
@ -54,3 +58,11 @@ fn test_rotation2()
assert!(randmat.rotated(ang).rotation().approx_eq(ang));
}
}
#[test]
fn test_index_mat2()
{
let mat: Mat2<f64> = random();
assert!(mat.at((0, 1)) == mat.transposed().at((1, 0)));
}