aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-01-21 17:10:23 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-01-21 17:10:23 +0000
commit5f43a42ee75bac32acd1c8f88c31e374fa9b297b (patch)
tree69cab3f24454f4751b344d23fbada2e147fd42a9 /test
parenta5fbf278430827d5945a4df505e63367c8c73a56 (diff)
* remove set(), revert to old behavior where = resizes
* try to be clever in matrix ctors and operator=: be lazy when we can, always allow to copy rowvector into columnvector, check the template parameters, try to factor the code better * add missing copy ctor in UnalignedType * fix bug in the traits of DiagonalProduct * renaming: EIGEN_TUNE_FOR_CPU_CACHE_SIZE * update the dox a little
Diffstat (limited to 'test')
-rw-r--r--test/basicstuff.cpp16
-rw-r--r--test/cholesky.cpp1
-rw-r--r--test/qtvector.cpp6
-rw-r--r--test/stdvector.cpp2
4 files changed, 8 insertions, 17 deletions
diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp
index 06d17c69e..0faefc156 100644
--- a/test/basicstuff.cpp
+++ b/test/basicstuff.cpp
@@ -95,19 +95,9 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
VERIFY_RAISES_ASSERT(m1 = (m2.block(0,0, rows-1, cols-1)));
}
- // test set
- {
- VERIFY_IS_APPROX(m3.set(m1),m1);
- MatrixType m4, m5;
- VERIFY_IS_APPROX(m4.set(m1),m1);
- if (MatrixType::RowsAtCompileTime==Dynamic && MatrixType::ColsAtCompileTime==Dynamic)
- {
- MatrixType m6(rows+1,cols);
- VERIFY_RAISES_ASSERT(m5 = m1);
- VERIFY_RAISES_ASSERT(m3 = m5);
- VERIFY_RAISES_ASSERT(m3 = m6);
- }
- }
+ VERIFY_IS_APPROX(m3 = m1,m1);
+ MatrixType m4;
+ VERIFY_IS_APPROX(m4 = m1,m1);
// test swap
m3 = m1;
diff --git a/test/cholesky.cpp b/test/cholesky.cpp
index 04f97bcea..2e3353d21 100644
--- a/test/cholesky.cpp
+++ b/test/cholesky.cpp
@@ -22,6 +22,7 @@
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.
+#define EIGEN_NO_ASSERTION_CHECKING
#include "main.h"
#include <Eigen/Cholesky>
#include <Eigen/LU>
diff --git a/test/qtvector.cpp b/test/qtvector.cpp
index cc938885a..a04002c36 100644
--- a/test/qtvector.cpp
+++ b/test/qtvector.cpp
@@ -47,7 +47,7 @@ void check_qtvector_matrix(const MatrixType& m)
}
v.resize(21);
- v[20].set(x);
+ v[20] = x;
VERIFY_IS_APPROX(v[20], x);
v.fill(y,22);
//v.resize(22);
@@ -97,7 +97,7 @@ void check_qtvector_transform(const TransformType&)
TransformType* ref = &w[0];
for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)
v.push_back(w[i%w.size()]);
- for(unsigned int i=23; i<v.size(); ++i)
+ for(unsigned int i=23; int(i)<v.size(); ++i)
{
VERIFY(v[i].matrix()==w[(i-23)%w.size()].matrix());
}
@@ -133,7 +133,7 @@ void check_qtvector_quaternion(const QuaternionType&)
QuaternionType* ref = &w[0];
for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)
v.push_back(w[i%w.size()]);
- for(unsigned int i=23; i<v.size(); ++i)
+ for(unsigned int i=23; int(i)<v.size(); ++i)
{
VERIFY(v[i].coeffs()==w[(i-23)%w.size()].coeffs());
}
diff --git a/test/stdvector.cpp b/test/stdvector.cpp
index be9fc275b..78e65e927 100644
--- a/test/stdvector.cpp
+++ b/test/stdvector.cpp
@@ -43,7 +43,7 @@ void check_stdvector_matrix(const MatrixType& m)
}
v.resize(21);
- v[20].set(x);
+ v[20] = x;
VERIFY_IS_APPROX(v[20], x);
v.resize(22,y);
VERIFY_IS_APPROX(v[21], y);