diff options
Diffstat (limited to 'test/geo_alignedbox.cpp')
-rw-r--r-- | test/geo_alignedbox.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/geo_alignedbox.cpp b/test/geo_alignedbox.cpp index 9c347df00..d1164b193 100644 --- a/test/geo_alignedbox.cpp +++ b/test/geo_alignedbox.cpp @@ -35,12 +35,13 @@ template<typename BoxType> void alignedbox(const BoxType& _box) /* this test covers the following files: AlignedBox.h */ - typedef typename BoxType::Index Index; - const Index dim = _box.dim(); + typedef typename BoxType::Index Index; typedef typename BoxType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, BoxType::AmbientDimAtCompileTime, 1> VectorType; + const Index dim = _box.dim(); + VectorType p0 = VectorType::Random(dim); VectorType p1 = VectorType::Random(dim); while( p1 == p0 ){ @@ -82,12 +83,14 @@ template<typename BoxType> void alignedbox(const BoxType& _box) template<typename BoxType> void alignedboxCastTests(const BoxType& _box) { - // casting - const int dim = _box.dim(); + // casting + typedef typename BoxType::Index Index; typedef typename BoxType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, BoxType::AmbientDimAtCompileTime, 1> VectorType; + const Index dim = _box.dim(); + VectorType p0 = VectorType::Random(dim); VectorType p1 = VectorType::Random(dim); |