diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-04 06:25:14 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-05 00:45:41 (GMT) |
commit | a212b402da4b4af9d453fa96dbfa2d32271e857d (patch) | |
tree | 2496e26b769c60b1ec041d55717e5b1617ed6669 /tests/auto/exceptionsafety_objects | |
parent | 5953d930bc07fa6734a11d053d26a3f80e9c1e89 (diff) | |
download | Qt-a212b402da4b4af9d453fa96dbfa2d32271e857d.zip Qt-a212b402da4b4af9d453fa96dbfa2d32271e857d.tar.gz Qt-a212b402da4b4af9d453fa96dbfa2d32271e857d.tar.bz2 |
Remove Q_ASSERT's from exceptionsafety_objects test
Report a fatal error in all builds, not just in debug builds.
Change-Id: Iad990e2d3b29a55e995254d466e967a4a722bb23
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/exceptionsafety_objects')
-rw-r--r-- | tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp b/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp index 2f094f3..d167228 100644 --- a/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp +++ b/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp @@ -371,7 +371,8 @@ struct WidgetCreator : public AbstractTester { void operator()(QObject *parent) { - Q_ASSERT(!parent || parent->isWidgetType()); + if (parent && !parent->isWidgetType()) + qFatal("%s: parent must be either null or a widget type", Q_FUNC_INFO); QScopedPointer<T> ptr(parent ? new T(static_cast<QWidget *>(parent)) : new T); } }; @@ -381,7 +382,8 @@ template <> struct WidgetCreator<QSizeGrip> : public AbstractTester { void operator()(QObject *parent) { - Q_ASSERT(!parent || parent->isWidgetType()); + if (parent && !parent->isWidgetType()) + qFatal("%s: parent must be either null or a widget type", Q_FUNC_INFO); QScopedPointer<QSizeGrip> ptr(new QSizeGrip(static_cast<QWidget *>(parent))); } }; @@ -391,7 +393,8 @@ template <> struct WidgetCreator<QDesktopWidget> : public AbstractTester { void operator()(QObject *parent) { - Q_ASSERT(!parent || parent->isWidgetType()); + if (parent && !parent->isWidgetType()) + qFatal("%s: parent must be either null or a widget type", Q_FUNC_INFO); QScopedPointer<QDesktopWidget> ptr(new QDesktopWidget()); } }; |