mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* add serious unit test for swap
* fix my stupidity in Matrix::swap()
This commit is contained in:
@@ -99,15 +99,6 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
|
||||
MatrixType m4;
|
||||
VERIFY_IS_APPROX(m4 = m1,m1);
|
||||
|
||||
// test swap
|
||||
m3 = m1;
|
||||
m1.swap(m2);
|
||||
VERIFY_IS_APPROX(m3, m2);
|
||||
if(rows*cols>=3)
|
||||
{
|
||||
VERIFY_IS_NOT_APPROX(m3, m1);
|
||||
}
|
||||
|
||||
m3.real() = m1.real();
|
||||
VERIFY_IS_APPROX(static_cast<const MatrixType&>(m3).real(), static_cast<const MatrixType&>(m1).real());
|
||||
VERIFY_IS_APPROX(static_cast<const MatrixType&>(m3).real(), m1.real());
|
||||
|
||||
Reference in New Issue
Block a user