diff options
author | ninerider <qt-info@nokia.com> | 2009-10-09 12:33:03 (GMT) |
---|---|---|
committer | ninerider <qt-info@nokia.com> | 2009-10-09 12:33:03 (GMT) |
commit | d788b9356fcf6cce041c021ae4dc5087a6ce40ce (patch) | |
tree | 379e9ce3aa94c2e3a511fb2db3f64b0efab853d9 /tests/auto | |
parent | b7a780e057642b2829238cd8e83b812ea963f687 (diff) | |
parent | 9ac420db693aecd5f9f1c51f305a0148f46636ba (diff) | |
download | Qt-d788b9356fcf6cce041c021ae4dc5087a6ce40ce.zip Qt-d788b9356fcf6cce041c021ae4dc5087a6ce40ce.tar.gz Qt-d788b9356fcf6cce041c021ae4dc5087a6ce40ce.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qbuttongroup/tst_qbuttongroup.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp | 16 | ||||
-rw-r--r-- | tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 26 |
3 files changed, 41 insertions, 3 deletions
diff --git a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp index 11c1f47..a19f865 100644 --- a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp +++ b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp @@ -406,7 +406,7 @@ void tst_QButtonGroup::task106609() QTestEventLoop::instance().enterLoop(1); QApplication::setActiveWindow(&dlg); - QTRY_COMPARE(QApplication::activeWindow(), &dlg); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&dlg)); //qDebug() << "int:" << spy2.count() << "QAbstractButton*:" << spy1.count(); QCOMPARE(spy2.count(), 2); diff --git a/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp b/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp index 3f9632c..2e21087 100644 --- a/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp +++ b/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp @@ -66,6 +66,7 @@ private slots: void setHeader(); void rawHeaderParsing_data(); void rawHeaderParsing(); + void originatingObject(); void removeHeader(); }; @@ -476,5 +477,20 @@ void tst_QNetworkRequest::removeHeader() QVERIFY(request.hasRawHeader("bar")); } +void tst_QNetworkRequest::originatingObject() +{ + QNetworkRequest request; + + QVERIFY(!request.originatingObject()); + + { + QObject dummy; + request.setOriginatingObject(&dummy); + QCOMPARE(request.originatingObject(), &dummy); + } + + QVERIFY(!request.originatingObject()); +} + QTEST_MAIN(tst_QNetworkRequest) #include "tst_qnetworkrequest.moc" diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index 58eaacb..ed9206c 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -812,8 +812,14 @@ void tst_QSharedPointer::differentPointers() QVERIFY(baseptr.data() == aData); QVERIFY(aData == baseptr.data()); - QVERIFY(bool(operator==<Data,DiffPtrDerivedData>(baseptr, aData))); + +#if defined(Q_CC_MSVC) && _MSC_VER < 1400 + QEXPECT_FAIL("", "Compiler bug", Continue); +#endif QVERIFY(baseptr == aData); +#if defined(Q_CC_MSVC) && _MSC_VER < 1400 + QEXPECT_FAIL("", "Compiler bug", Continue); +#endif QVERIFY(aData == baseptr); } check(); @@ -829,6 +835,9 @@ void tst_QSharedPointer::differentPointers() QVERIFY(ptr == baseptr); QVERIFY(ptr.data() == baseptr.data()); QVERIFY(ptr == aBase); +#if defined(Q_CC_MSVC) && _MSC_VER < 1400 + QEXPECT_FAIL("", "Compiler bug", Continue); +#endif QVERIFY(baseptr == aData); } check(); @@ -845,6 +854,9 @@ void tst_QSharedPointer::differentPointers() QVERIFY(ptr.data() == baseptr.data()); QVERIFY(ptr == aBase); QVERIFY(ptr == aData); +#if defined(Q_CC_MSVC) && _MSC_VER < 1400 + QEXPECT_FAIL("", "Compiler bug", Continue); +#endif QVERIFY(baseptr == aData); QVERIFY(baseptr == aBase); } @@ -865,6 +877,9 @@ void tst_QSharedPointer::virtualBaseDifferentPointers() QVERIFY(ptr.data() == baseptr.data()); QVERIFY(ptr == aBase); QVERIFY(ptr == aData); +#if defined(Q_CC_MSVC) && _MSC_VER < 1400 + QEXPECT_FAIL("", "Compiler bug", Continue); +#endif QVERIFY(baseptr == aData); QVERIFY(baseptr == aBase); } @@ -882,6 +897,9 @@ void tst_QSharedPointer::virtualBaseDifferentPointers() QVERIFY(ptr.data() == baseptr.data()); QVERIFY(ptr == aBase); QVERIFY(ptr == aData); +#if defined(Q_CC_MSVC) && _MSC_VER < 1400 + QEXPECT_FAIL("", "Compiler bug", Continue); +#endif QVERIFY(baseptr == aData); QVERIFY(baseptr == aBase); } @@ -1701,7 +1719,7 @@ void tst_QSharedPointer::invalidConstructs() "struct DerivedData: public Data { int j; };\n" "\n" "extern int forwardDeclaredDestructorRunCount;\n" - "struct ForwardDeclared;\n" + "class ForwardDeclared;\n" "ForwardDeclared *forwardPointer();\n" ); @@ -1730,6 +1748,10 @@ void tst_QSharedPointer::invalidConstructs() bool result = (test.*testFunction)(body); if (qgetenv("QTEST_EXTERNAL_DEBUG").toInt() > 0) { qDebug("External test output:"); +#ifdef Q_CC_MSVC + // MSVC prints errors to stdout + printf("%s\n", test.standardOutput().constData()); +#endif printf("%s\n", test.standardError().constData()); } if (!result) { |