* fix compilation issue in Product

* added some tests for product and swap
* overload .swap() for dynamic-sized matrix of same size
This commit is contained in:
Gael Guennebaud
2008-07-02 16:05:33 +00:00
parent 9433df83a7
commit 8463b7d3f4
8 changed files with 101 additions and 61 deletions

View File

@@ -82,6 +82,12 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
{
VERIFY_RAISES_ASSERT(m1 = (m2.block(0,0, rows-1, cols-1)));
}
// test swap
m3 = m1;
m1.swap(m2);
VERIFY_IS_APPROX(m3, m2);
VERIFY_IS_NOT_APPROX(m3, m1);
}
void test_basicstuff()