diff options
author | hjk <qtc-committer@nokia.com> | 2011-05-16 20:04:17 +0200 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2011-05-16 20:04:43 +0200 |
commit | 0d3fa271b53c18a147c9c363c0893dcb8715bca3 (patch) | |
tree | 759a7ec10efb6b380f720cfb99d37ad8bf73dcdc /tests | |
parent | 2b9c0106bcbb1bc08d3d9a8ea65f4b00807f5e26 (diff) | |
download | qt-creator-0d3fa271b53c18a147c9c363c0893dcb8715bca3.tar.gz |
debugger: add dumper for Eigen::Matrix
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp index 43ab564baa..1d253f4eb1 100644 --- a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp +++ b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp @@ -90,12 +90,17 @@ #define USE_PRIVATE 1 //#define USE_BOOST 1 +//#define USE_EIGEN 1 #if USE_BOOST #include <boost/optional.hpp> #include <boost/shared_ptr.hpp> #endif +#if USE_EIGEN +#include <eigen2/Eigen/Core> +#endif + #if USE_PRIVATE #include <QtCore/private/qobject_p.h> #endif @@ -142,6 +147,7 @@ int z; } } + #if USE_PRIVATE class DerivedObjectPrivate : public QObjectPrivate @@ -2579,8 +2585,35 @@ void testKR() } +void testEigen() +{ +#if USE_EIGEN + using namespace Eigen; + + Matrix3d myMatrix = Matrix3d::Constant(5); + MatrixXd myDynamicMatrix(30, 10); + + myDynamicMatrix(0, 0) = 0; + myDynamicMatrix(1, 0) = 1; + myDynamicMatrix(2, 0) = 2; + + Matrix<double, 2, 1, RowMajor> rowMajorMatrix1; + rowMajorMatrix1 << 34, 44; + + Matrix<double, 2, 2, RowMajor> rowMajorMatrix; + rowMajorMatrix << 0, 1, 2, 3; + + int i = 0; + ++i; + ++i; + ++i; +#endif +} + + int main(int argc, char *argv[]) { + testEigen(); testKR(); int *x = new int(32); Q_UNUSED(x); |