mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +08:00
fix bad tests
This commit is contained in:
parent
75da254fc3
commit
768bdd08c8
@ -41,10 +41,10 @@ template <typename MatrixType> void run_nesting_ops(const MatrixType& _m)
|
|||||||
|
|
||||||
// The only intention of these tests is to ensure that this code does
|
// The only intention of these tests is to ensure that this code does
|
||||||
// not trigger any asserts or segmentation faults... more to come.
|
// not trigger any asserts or segmentation faults... more to come.
|
||||||
VERIFY( (m.transpose() * m).diagonal().sum() == (m.transpose() * m).diagonal().sum() );
|
VERIFY_IS_APPROX( (m.transpose() * m).diagonal().sum(), (m.transpose() * m).diagonal().sum() );
|
||||||
VERIFY( (m.transpose() * m).diagonal().array().abs().sum() == (m.transpose() * m).diagonal().array().abs().sum() );
|
VERIFY_IS_APPROX( (m.transpose() * m).diagonal().array().abs().sum(), (m.transpose() * m).diagonal().array().abs().sum() );
|
||||||
|
|
||||||
VERIFY( (m.transpose() * m).array().abs().sum() == (m.transpose() * m).array().abs().sum() );
|
VERIFY_IS_APPROX( (m.transpose() * m).array().abs().sum(), (m.transpose() * m).array().abs().sum() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_nesting_ops()
|
void test_nesting_ops()
|
||||||
|
@ -88,7 +88,7 @@ void testVectorType(const VectorType& base)
|
|||||||
Matrix<Scalar,1,Dynamic> col_vector(size);
|
Matrix<Scalar,1,Dynamic> col_vector(size);
|
||||||
row_vector.setLinSpaced(low,high,size);
|
row_vector.setLinSpaced(low,high,size);
|
||||||
col_vector.setLinSpaced(low,high,size);
|
col_vector.setLinSpaced(low,high,size);
|
||||||
VERIFY( (row_vector-col_vector.transpose()).norm() < 1e-10 );
|
VERIFY( (row_vector-col_vector.transpose()).norm() < NumTraits<Scalar>::epsilon() );
|
||||||
|
|
||||||
Matrix<Scalar,Dynamic,1> size_changer(size+50);
|
Matrix<Scalar,Dynamic,1> size_changer(size+50);
|
||||||
size_changer.setLinSpaced(low,high,size);
|
size_changer.setLinSpaced(low,high,size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user