summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/moc/tst_moc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/tools/moc/tst_moc.cpp')
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index c5469bd33a..9a737ef96b 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -1839,6 +1839,12 @@ void tst_Moc::warnings_data()
<< QString("IGNORE_ALL_STDOUT")
<< QString(":3: Warning: Macro argument mismatch.\n:4: Warning: Macro argument mismatch.");
+ QTest::newRow("Class declaration lacks Q_OBJECT macro.")
+ << QByteArray("class X : public QObject \n { \n public slots: \n void foo() {} \n };")
+ << QStringList()
+ << 1
+ << QString()
+ << QString("standard input:5: Error: Class declaration lacks Q_OBJECT macro.");
}
void tst_Moc::warnings()