diff options
Diffstat (limited to 'tests/auto/corelib/global/qglobal')
-rw-r--r-- | tests/auto/corelib/global/qglobal/tst_qglobal.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp index b3115e036e..23ec228c68 100644 --- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp +++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp @@ -53,6 +53,7 @@ private slots: void qtry(); void checkptr(); void qstaticassert(); + void qConstructorFunction(); }; void tst_QGlobal::qIsNull() @@ -353,5 +354,17 @@ void tst_QGlobal::qstaticassert() QVERIFY(true); // if the test compiles it has passed. } +static int qConstructorFunctionValue; +static void qConstructorFunctionCtor() +{ + qConstructorFunctionValue = 123; +} +Q_CONSTRUCTOR_FUNCTION(qConstructorFunctionCtor); + +void tst_QGlobal::qConstructorFunction() +{ + QCOMPARE(qConstructorFunctionValue, 123); +} + QTEST_MAIN(tst_QGlobal) #include "tst_qglobal.moc" |