diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qbytearray/tst_qbytearray.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp index 44cfe4a..b0bf3df 100644 --- a/tests/auto/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/qbytearray/tst_qbytearray.cpp @@ -236,6 +236,7 @@ void tst_QByteArray::qUncompress_data() void tst_QByteArray::qUncompress() { QFETCH(QByteArray, in); + QFETCH(QByteArray, out); #if defined Q_OS_HPUX && !defined __ia64 && defined Q_CC_GNU QSKIP("Corrupt data causes this tests to lock up on HP-UX / PA-RISC with gcc", SkipAll); @@ -245,9 +246,20 @@ void tst_QByteArray::qUncompress() QSKIP("Corrupt data causes this test to lock up on QNX", SkipAll); #endif - QTEST(::qUncompress(in), "out"); + QByteArray res; + QT_TRY { + res = ::qUncompress(in); + } QT_CATCH(const std::bad_alloc &) { + res = QByteArray(); + } + QCOMPARE(res, out); - QTEST(::qUncompress(in + "blah"), "out"); + QT_TRY { + res = ::qUncompress(in + "blah"); + } QT_CATCH(const std::bad_alloc &) { + res = QByteArray(); + } + QCOMPARE(res, out); } #endif |