Commit 0fc78867 authored by hjk's avatar hjk

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: default avatarhjk <hjk121@nokiamail.com>
parent 4974e246
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment