diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-08-21 12:39:29 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-08-21 12:39:29 (GMT) |
commit | e59ee48a8656d04339967ad99334bd0ddca0c956 (patch) | |
tree | 4fe72429115ae4a4171cd3f1f06d9a3a425973d0 /tests | |
parent | 4aa6869877d4906fcfaac5388294748512cace25 (diff) | |
parent | 508b447075fb852e61ddf88c92c9099dad292747 (diff) | |
download | Qt-e59ee48a8656d04339967ad99334bd0ddca0c956.zip Qt-e59ee48a8656d04339967ad99334bd0ddca0c956.tar.gz Qt-e59ee48a8656d04339967ad99334bd0ddca0c956.tar.bz2 |
Merge commit 'qt/master'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qstatemachine/tst_qstatemachine.cpp | 16 | ||||
-rw-r--r-- | tests/auto/qvariant/tst_qvariant.cpp | 3 |
3 files changed, 11 insertions, 12 deletions
diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp index 932803a..886c70b 100644 --- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp +++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp @@ -1844,7 +1844,6 @@ void tst_QScriptEngineAgent::eventOrder_functions() QCOMPARE(spy->at(37).type, ScriptEngineEvent::ContextPop); // exception QCOMPARE(spy->at(38).type, ScriptEngineEvent::ExceptionThrow); - QEXPECT_FAIL("","New backend propably gives bad script id for exceptions", Abort); QCOMPARE(spy->at(38).scriptId, spy->at(21).scriptId); QVERIFY(!spy->at(38).hasExceptionHandler); // bar() exit @@ -1921,7 +1920,6 @@ void tst_QScriptEngineAgent::eventOrder_signalsHandling() emit testSignal(123); - QEXPECT_FAIL("","Signals events problem", Abort); QCOMPARE(spy->count(), 14); // new context QCOMPARE(spy->at(4).type, ScriptEngineEvent::ContextPush); @@ -2048,7 +2046,7 @@ void tst_QScriptEngineAgent::syntaxError() spy->clear(); eng.evaluate("{"); - //QCOMPARE(spy->count(), 9); + QCOMPARE(spy->count(), 9); QCOMPARE(spy->at(i).type, ScriptEngineEvent::ScriptLoad); QVERIFY(spy->at(i).scriptId != -1); diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp index 5e2064b..20e69ce 100644 --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp @@ -2066,7 +2066,7 @@ void tst_QStateMachine::eventTransitions() QPushButton button2; machine.start(); QCoreApplication::processEvents(); - trans->setEventObject(&button2); + trans->setEventSource(&button2); QTest::mousePress(&button2, Qt::LeftButton); QTRY_COMPARE(finishedSpy.count(), 4); } @@ -2078,16 +2078,16 @@ void tst_QStateMachine::eventTransitions() QEventTransition *trans; if (x == 0) { trans = new QEventTransition(); - QCOMPARE(trans->eventObject(), (QObject*)0); + QCOMPARE(trans->eventSource(), (QObject*)0); QCOMPARE(trans->eventType(), QEvent::None); - trans->setEventObject(&button); + trans->setEventSource(&button); trans->setEventType(QEvent::MouseButtonPress); trans->setTargetState(s1); } else if (x == 1) { trans = new QEventTransition(&button, QEvent::MouseButtonPress); trans->setTargetState(s1); } - QCOMPARE(trans->eventObject(), (QObject*)&button); + QCOMPARE(trans->eventSource(), (QObject*)&button); QCOMPARE(trans->eventType(), QEvent::MouseButtonPress); QCOMPARE(trans->targetState(), (QAbstractState*)s1); s0->addTransition(trans); @@ -2108,10 +2108,10 @@ void tst_QStateMachine::eventTransitions() QFinalState *s1 = new QFinalState(&machine); QMouseEventTransition *trans = new QMouseEventTransition(); - QCOMPARE(trans->eventObject(), (QObject*)0); + QCOMPARE(trans->eventSource(), (QObject*)0); QCOMPARE(trans->eventType(), QEvent::None); QCOMPARE(trans->button(), Qt::NoButton); - trans->setEventObject(&button); + trans->setEventSource(&button); trans->setEventType(QEvent::MouseButtonPress); trans->setButton(Qt::LeftButton); trans->setTargetState(s1); @@ -2155,10 +2155,10 @@ void tst_QStateMachine::eventTransitions() QFinalState *s1 = new QFinalState(&machine); QKeyEventTransition *trans = new QKeyEventTransition(); - QCOMPARE(trans->eventObject(), (QObject*)0); + QCOMPARE(trans->eventSource(), (QObject*)0); QCOMPARE(trans->eventType(), QEvent::None); QCOMPARE(trans->key(), 0); - trans->setEventObject(&button); + trans->setEventSource(&button); trans->setEventType(QEvent::KeyPress); trans->setKey(Qt::Key_A); trans->setTargetState(s1); diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp index 729e29b..fc977bc 100644 --- a/tests/auto/qvariant/tst_qvariant.cpp +++ b/tests/auto/qvariant/tst_qvariant.cpp @@ -2623,7 +2623,7 @@ void tst_QVariant::qvariant_cast_QObject_data() { QTest::addColumn<QVariant>("data"); QTest::addColumn<bool>("success"); - QTest::newRow("from QObject") << QVariant(QMetaType::QObjectStar, new QObject) << true; + QTest::newRow("from QObject") << QVariant(QMetaType::QObjectStar, new QObject(this)) << true; QTest::newRow("from String") << QVariant(QLatin1String("1, 2, 3")) << false; QTest::newRow("from int") << QVariant((int) 123) << false; } @@ -2748,6 +2748,7 @@ void tst_QVariant::dataStar() const v2 = qVariantFromValue(p1); QVERIFY(v1 == v2); + delete p1; } void tst_QVariant::canConvertQStringList() const |