diff options
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/tools/collections/tst_collections.cpp | 1 | ||||
-rw-r--r-- | tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp | 11 |
2 files changed, 2 insertions, 10 deletions
diff --git a/tests/auto/corelib/tools/collections/tst_collections.cpp b/tests/auto/corelib/tools/collections/tst_collections.cpp index 50f9f155d0..0d4623f7fd 100644 --- a/tests/auto/corelib/tools/collections/tst_collections.cpp +++ b/tests/auto/corelib/tools/collections/tst_collections.cpp @@ -2920,6 +2920,7 @@ void tst_Collections::forwardDeclared() TEST(QVector<T1>); TEST(QStack<T1>); TEST(QQueue<T1>); + TEST(QSet<T1>); #undef TEST #undef COMMA diff --git a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp index d82f4c4a22..9aa1b4e668 100644 --- a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp +++ b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp @@ -2297,7 +2297,6 @@ ThrowingTypeWatcher& throwingTypeWatcher() { static ThrowingTypeWatcher global; struct ThrowingType { static unsigned int throwOnce; - static unsigned int throwOnceInDtor; static constexpr char throwString[] = "Requested to throw"; static constexpr char throwStringDtor[] = "Requested to throw in dtor"; void checkThrow() { @@ -2326,22 +2325,14 @@ struct ThrowingType checkThrow(); return *this; } - ~ThrowingType() noexcept(false) + ~ThrowingType() { throwingTypeWatcher().destroyed(id); // notify global watcher id = -1; - // deferred throw - if (throwOnceInDtor > 0) { - --throwOnceInDtor; - if (throwOnceInDtor == 0) { - throw std::runtime_error(throwStringDtor); - } - } } }; unsigned int ThrowingType::throwOnce = 0; -unsigned int ThrowingType::throwOnceInDtor = 0; bool operator==(const ThrowingType &a, const ThrowingType &b) { return a.id == b.id; } |