mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-18 14:34:17 +08:00
clean several other assertion checking tests
This commit is contained in:
parent
501bc602ec
commit
96464f8563
@ -150,7 +150,8 @@ template<typename Scalar> void hyperplane_alignment()
|
|||||||
VERIFY_IS_APPROX(p1->coeffs(), p2->coeffs());
|
VERIFY_IS_APPROX(p1->coeffs(), p2->coeffs());
|
||||||
VERIFY_IS_APPROX(p1->coeffs(), p3->coeffs());
|
VERIFY_IS_APPROX(p1->coeffs(), p3->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*>(array3u)) Plane3a));
|
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Plane3a));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,8 @@ template<typename Scalar> void parametrizedline_alignment()
|
|||||||
VERIFY_IS_APPROX(p1->direction(), p2->direction());
|
VERIFY_IS_APPROX(p1->direction(), p2->direction());
|
||||||
VERIFY_IS_APPROX(p1->direction(), p3->direction());
|
VERIFY_IS_APPROX(p1->direction(), p3->direction());
|
||||||
|
|
||||||
#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*>(array3u)) Line4a));
|
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Line4a));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -100,6 +101,7 @@ void test_geo_parametrizedline()
|
|||||||
for(int i = 0; i < g_repeat; i++) {
|
for(int i = 0; i < g_repeat; i++) {
|
||||||
CALL_SUBTEST_1( parametrizedline(ParametrizedLine<float,2>()) );
|
CALL_SUBTEST_1( parametrizedline(ParametrizedLine<float,2>()) );
|
||||||
CALL_SUBTEST_2( parametrizedline(ParametrizedLine<float,3>()) );
|
CALL_SUBTEST_2( parametrizedline(ParametrizedLine<float,3>()) );
|
||||||
|
CALL_SUBTEST_2( parametrizedline_alignment<float>() );
|
||||||
CALL_SUBTEST_3( parametrizedline(ParametrizedLine<double,4>()) );
|
CALL_SUBTEST_3( parametrizedline(ParametrizedLine<double,4>()) );
|
||||||
CALL_SUBTEST_3( parametrizedline_alignment<double>() );
|
CALL_SUBTEST_3( parametrizedline_alignment<double>() );
|
||||||
CALL_SUBTEST_4( parametrizedline(ParametrizedLine<std::complex<double>,5>()) );
|
CALL_SUBTEST_4( parametrizedline(ParametrizedLine<std::complex<double>,5>()) );
|
||||||
|
@ -148,9 +148,7 @@ template<typename Scalar> void mapQuaternion(void){
|
|||||||
VERIFY_IS_APPROX(q4.coeffs(), q3.coeffs());
|
VERIFY_IS_APPROX(q4.coeffs(), q3.coeffs());
|
||||||
#ifdef EIGEN_VECTORIZE
|
#ifdef EIGEN_VECTORIZE
|
||||||
if(internal::packet_traits<Scalar>::Vectorizable)
|
if(internal::packet_traits<Scalar>::Vectorizable)
|
||||||
{
|
|
||||||
VERIFY_RAISES_ASSERT((MQuaternionA(array3unaligned)));
|
VERIFY_RAISES_ASSERT((MQuaternionA(array3unaligned)));
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,11 +171,9 @@ template<typename Scalar> void quaternionAlignment(void){
|
|||||||
|
|
||||||
VERIFY_IS_APPROX(q1->coeffs(), q2->coeffs());
|
VERIFY_IS_APPROX(q1->coeffs(), q2->coeffs());
|
||||||
VERIFY_IS_APPROX(q1->coeffs(), q3->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)
|
if(internal::packet_traits<Scalar>::Vectorizable)
|
||||||
{
|
|
||||||
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(arrayunaligned)) QuaternionA));
|
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(arrayunaligned)) QuaternionA));
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,8 +197,8 @@ void test_geo_quaternion()
|
|||||||
for(int i = 0; i < g_repeat; i++) {
|
for(int i = 0; i < g_repeat; i++) {
|
||||||
CALL_SUBTEST_1(( quaternion<float,AutoAlign>() ));
|
CALL_SUBTEST_1(( quaternion<float,AutoAlign>() ));
|
||||||
CALL_SUBTEST_1( check_const_correctness(Quaternionf()) );
|
CALL_SUBTEST_1( check_const_correctness(Quaternionf()) );
|
||||||
// CALL_SUBTEST_2(( quaternion<double,AutoAlign>() ));
|
CALL_SUBTEST_2(( quaternion<double,AutoAlign>() ));
|
||||||
// CALL_SUBTEST_2( check_const_correctness(Quaterniond()) );
|
CALL_SUBTEST_2( check_const_correctness(Quaterniond()) );
|
||||||
CALL_SUBTEST_3(( quaternion<float,DontAlign>() ));
|
CALL_SUBTEST_3(( quaternion<float,DontAlign>() ));
|
||||||
CALL_SUBTEST_4(( quaternion<double,DontAlign>() ));
|
CALL_SUBTEST_4(( quaternion<double,DontAlign>() ));
|
||||||
CALL_SUBTEST_5(( quaternionAlignment<float>() ));
|
CALL_SUBTEST_5(( quaternionAlignment<float>() ));
|
||||||
|
@ -442,7 +442,8 @@ template<typename Scalar> void transform_alignment()
|
|||||||
|
|
||||||
VERIFY_IS_APPROX( (*p1) * (*p1), (*p2)*(*p3));
|
VERIFY_IS_APPROX( (*p1) * (*p1), (*p2)*(*p3));
|
||||||
|
|
||||||
#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*>(array3u)) Projective3a));
|
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Projective3a));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -455,6 +456,7 @@ void test_geo_transformations()
|
|||||||
|
|
||||||
CALL_SUBTEST_2(( transformations<float,AffineCompact,AutoAlign>() ));
|
CALL_SUBTEST_2(( transformations<float,AffineCompact,AutoAlign>() ));
|
||||||
CALL_SUBTEST_2(( non_projective_only<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,AutoAlign>() ));
|
||||||
CALL_SUBTEST_3(( transformations<double,Projective,DontAlign>() ));
|
CALL_SUBTEST_3(( transformations<double,Projective,DontAlign>() ));
|
||||||
|
@ -51,9 +51,7 @@ template<typename VectorType> void map_class_vector(const VectorType& m)
|
|||||||
VERIFY_IS_EQUAL(ma1, ma3);
|
VERIFY_IS_EQUAL(ma1, ma3);
|
||||||
#ifdef EIGEN_VECTORIZE
|
#ifdef EIGEN_VECTORIZE
|
||||||
if(internal::packet_traits<Scalar>::Vectorizable)
|
if(internal::packet_traits<Scalar>::Vectorizable)
|
||||||
{
|
|
||||||
VERIFY_RAISES_ASSERT((Map<VectorType,Aligned>(array3unaligned, size)))
|
VERIFY_RAISES_ASSERT((Map<VectorType,Aligned>(array3unaligned, size)))
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
internal::aligned_delete(array1, size);
|
internal::aligned_delete(array1, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user