From 0fc78867a78c9ba4f54d1c0ead8052e6f60891b6 Mon Sep 17 00:00:00 2001 From: hjk <hjk121@nokiamail.com> Date: Thu, 9 Jan 2014 23:35:35 +0100 Subject: [PATCH] Debugger: Make Eigen tests compile But disable it for now. We might need a way to "configure" tests depending on installed packages. Change-Id: Id09b8fdae3478dd483c9e540c5538dfbae1e9c1c Reviewed-by: hjk <hjk121@nokiamail.com> --- tests/auto/debugger/tst_dumpers.cpp | 72 +++++++++++++++++------------ 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index a53865304ab..98f6add1523 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -539,6 +539,7 @@ struct LldbVersion : VersionBase }; struct ForceC {}; +struct EigenProfile {}; struct CoreProfile {}; struct CorePrivateProfile {}; @@ -615,6 +616,15 @@ public: return *this; } + const Data &operator%(const EigenProfile &) const + { + profileExtra += + "INCLUDEPATH += /usr/include/eigen2\n" + "INCLUDEPATH += /usr/include/eigen3\n"; + + return *this; + } + const Data &operator%(const CoreProfile &) const { profileExtra += @@ -4722,39 +4732,41 @@ void tst_Dumpers::dumper_data() // % Check("ptr2.type KRBase::TYPE_B (1) KRBase::Type"); - -// QTest::newRow("Eigen") -// << Data( -// "using namespace Eigen;\n" - -// "Vector3d test = Vector3d::Zero();\n" - -// "Matrix3d myMatrix = Matrix3d::Constant(5);\n" -// "MatrixXd myDynamicMatrix(30, 10);\n" - -// "myDynamicMatrix(0, 0) = 0;\n" -// "myDynamicMatrix(1, 0) = 1;\n" -// "myDynamicMatrix(2, 0) = 2;\n" - -// "Matrix<double, 12, 15, ColMajor> colMajorMatrix;\n" -// "Matrix<double, 12, 15, RowMajor> rowMajorMatrix;\n" - -// "int k = 0;\n" -// "for (int i = 0; i != 12; ++i) {\n" -// " for (int j = 0; j != 15; ++j) {\n" -// " colMajorMatrix(i, j) = k;\n" -// " rowMajorMatrix(i, j) = k;\n" -// " ++k;\n" -// " }\n" -// "}\n" +#if 0 + QTest::newRow("Eigen") + << Data("#include <Eigen/Core>", + "using namespace Eigen;\n" + "Vector3d test = Vector3d::Zero();\n" + "Matrix3d myMatrix = Matrix3d::Constant(5);\n" + "MatrixXd myDynamicMatrix(30, 10);\n" + + "myDynamicMatrix(0, 0) = 0;\n" + "myDynamicMatrix(1, 0) = 1;\n" + "myDynamicMatrix(2, 0) = 2;\n" + + "Matrix<double, 12, 15, ColMajor> colMajorMatrix;\n" + "Matrix<double, 12, 15, RowMajor> rowMajorMatrix;\n" + + "int k = 0;\n" + "for (int i = 0; i != 12; ++i) {\n" + " for (int j = 0; j != 15; ++j) {\n" + " colMajorMatrix(i, j) = k;\n" + " rowMajorMatrix(i, j) = k;\n" + " ++k;\n" + " }\n" + "}\n") + % EigenProfile() + % CheckType("myMatrix", "Eigen::Matrix3d"); +#endif -// QTest::newRow("https://bugreports.qt-project.org/browse/QTCREATORBUG-3611") -// "typedef unsigned char byte;\n" -// "byte f = '2';\n" -// "int *x = (int*)&f;\n" -// % Check("f 50 '2' bug3611::byte"); + // https://bugreports.qt-project.org/browse/QTCREATORBUG-3611 + QTest::newRow("Bug3611") + << Data("typedef unsigned char byte;\n" + "byte f = '2';\n" + "int *x = (int*)&f;\n") + % Check("f", "50 '2'", "byte"); -- GitLab