clean several other assertion checking tests

This commit is contained in:
Gael Guennebaud 2011-05-20 09:59:15 +02:00
parent 501bc602ec
commit 96464f8563
5 changed files with 15 additions and 16 deletions

View File

@ -150,8 +150,9 @@ template<typename Scalar> void hyperplane_alignment()
VERIFY_IS_APPROX(p1->coeffs(), p2->coeffs());
VERIFY_IS_APPROX(p1->coeffs(), p3->coeffs());
#ifdef EIGEN_VECTORIZE
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Plane3a));
#if defined(EIGEN_VECTORIZE) && !defined(EIGEN_DONT_ALIGN_STATICALLY)
if(internal::packet_traits<Scalar>::Vectorizable)
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Plane3a));
#endif
}

View File

@ -90,8 +90,9 @@ template<typename Scalar> void parametrizedline_alignment()
VERIFY_IS_APPROX(p1->direction(), p2->direction());
VERIFY_IS_APPROX(p1->direction(), p3->direction());
#ifdef EIGEN_VECTORIZE
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Line4a));
#if defined(EIGEN_VECTORIZE) && !defined(EIGEN_DONT_ALIGN_STATICALLY)
if(internal::packet_traits<Scalar>::Vectorizable)
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Line4a));
#endif
}
@ -100,6 +101,7 @@ void test_geo_parametrizedline()
for(int i = 0; i < g_repeat; i++) {
CALL_SUBTEST_1( parametrizedline(ParametrizedLine<float,2>()) );
CALL_SUBTEST_2( parametrizedline(ParametrizedLine<float,3>()) );
CALL_SUBTEST_2( parametrizedline_alignment<float>() );
CALL_SUBTEST_3( parametrizedline(ParametrizedLine<double,4>()) );
CALL_SUBTEST_3( parametrizedline_alignment<double>() );
CALL_SUBTEST_4( parametrizedline(ParametrizedLine<std::complex<double>,5>()) );

View File

@ -148,9 +148,7 @@ template<typename Scalar> void mapQuaternion(void){
VERIFY_IS_APPROX(q4.coeffs(), q3.coeffs());
#ifdef EIGEN_VECTORIZE
if(internal::packet_traits<Scalar>::Vectorizable)
{
VERIFY_RAISES_ASSERT((MQuaternionA(array3unaligned)));
}
#endif
}
@ -173,11 +171,9 @@ template<typename Scalar> void quaternionAlignment(void){
VERIFY_IS_APPROX(q1->coeffs(), q2->coeffs());
VERIFY_IS_APPROX(q1->coeffs(), q3->coeffs());
#ifdef EIGEN_VECTORIZE
#if defined(EIGEN_VECTORIZE) && !defined(EIGEN_DONT_ALIGN_STATICALLY)
if(internal::packet_traits<Scalar>::Vectorizable)
{
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(arrayunaligned)) QuaternionA));
}
#endif
}
@ -201,8 +197,8 @@ void test_geo_quaternion()
for(int i = 0; i < g_repeat; i++) {
CALL_SUBTEST_1(( quaternion<float,AutoAlign>() ));
CALL_SUBTEST_1( check_const_correctness(Quaternionf()) );
// CALL_SUBTEST_2(( quaternion<double,AutoAlign>() ));
// CALL_SUBTEST_2( check_const_correctness(Quaterniond()) );
CALL_SUBTEST_2(( quaternion<double,AutoAlign>() ));
CALL_SUBTEST_2( check_const_correctness(Quaterniond()) );
CALL_SUBTEST_3(( quaternion<float,DontAlign>() ));
CALL_SUBTEST_4(( quaternion<double,DontAlign>() ));
CALL_SUBTEST_5(( quaternionAlignment<float>() ));

View File

@ -442,8 +442,9 @@ template<typename Scalar> void transform_alignment()
VERIFY_IS_APPROX( (*p1) * (*p1), (*p2)*(*p3));
#ifdef EIGEN_VECTORIZE
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Projective3a));
#if defined(EIGEN_VECTORIZE) && !defined(EIGEN_DONT_ALIGN_STATICALLY)
if(internal::packet_traits<Scalar>::Vectorizable)
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Projective3a));
#endif
}
@ -455,7 +456,8 @@ void test_geo_transformations()
CALL_SUBTEST_2(( transformations<float,AffineCompact,AutoAlign>() ));
CALL_SUBTEST_2(( non_projective_only<float,AffineCompact,AutoAlign>() ));
CALL_SUBTEST_2(( transform_alignment<float>() ));
CALL_SUBTEST_3(( transformations<double,Projective,AutoAlign>() ));
CALL_SUBTEST_3(( transformations<double,Projective,DontAlign>() ));
CALL_SUBTEST_3(( transform_alignment<double>() ));

View File

@ -51,9 +51,7 @@ template<typename VectorType> void map_class_vector(const VectorType& m)
VERIFY_IS_EQUAL(ma1, ma3);
#ifdef EIGEN_VECTORIZE
if(internal::packet_traits<Scalar>::Vectorizable)
{
VERIFY_RAISES_ASSERT((Map<VectorType,Aligned>(array3unaligned, size)))
}
#endif
internal::aligned_delete(array1, size);