summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/tools/moc/parse-defines.h5
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp4
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/tools/moc/parse-defines.h b/tests/auto/tools/moc/parse-defines.h
index 3e5841835d..f12899e368 100644
--- a/tests/auto/tools/moc/parse-defines.h
+++ b/tests/auto/tools/moc/parse-defines.h
@@ -76,6 +76,9 @@
#endif
+#define PD_ADD_SUFFIX(x) PD_DEFINE1(x,_SUFFIX)
+#define PD_DEFINE_ITSELF PD_ADD_SUFFIX(PD_DEFINE_ITSELF)
+
PD_BEGIN_NAMESPACE
class PD_CLASSNAME : public QObject
@@ -128,6 +131,8 @@ public slots:
void conditionSlot() {}
#endif
+ void PD_DEFINE_ITSELF(int) {}
+
};
#undef QString
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index f0d1934a93..ee82dc0652 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -2772,7 +2772,6 @@ void tst_Moc::parseDefines()
}
if (!qstrcmp(mci.name(), "TestString2")) {
++count;
- qDebug() << mci.value();
QVERIFY(!qstrcmp(mci.value(), "ParseDefine"));
}
if (!qstrcmp(mci.name(), "TestString3")) {
@@ -2781,6 +2780,9 @@ void tst_Moc::parseDefines()
}
}
QVERIFY(count == 3);
+
+ index = mo->indexOfSlot("PD_DEFINE_ITSELF_SUFFIX(int)");
+ QVERIFY(index != -1);
}
void tst_Moc::preprocessorOnly()