summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmetatype/tst_qmetatype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qmetatype/tst_qmetatype.cpp')
-rw-r--r--tests/auto/qmetatype/tst_qmetatype.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/qmetatype/tst_qmetatype.cpp b/tests/auto/qmetatype/tst_qmetatype.cpp
index fcb949fbeb..ccf0ac5836 100644
--- a/tests/auto/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/qmetatype/tst_qmetatype.cpp
@@ -96,10 +96,18 @@ struct Bar
Bar()
{
// check re-entrancy
- Q_ASSERT(QMetaType::isRegistered(qRegisterMetaType<Foo>("Foo")));
+ if (!QMetaType::isRegistered(qRegisterMetaType<Foo>("Foo"))) {
+ qWarning("%s: re-entrancy test failed", Q_FUNC_INFO);
+ ++failureCount;
+ }
}
+
+public:
+ static int failureCount;
};
+int Bar::failureCount = 0;
+
class MetaTypeTorturer: public QThread
{
Q_OBJECT
@@ -161,6 +169,7 @@ void tst_QMetaType::threadSafety()
QCOMPARE(t1.failureCount, 0);
QCOMPARE(t2.failureCount, 0);
QCOMPARE(t3.failureCount, 0);
+ QCOMPARE(Bar::failureCount, 0);
}
namespace TestSpace