From 5ae1ccd2b12fcbc55fa2d14c39d8da3f4440a11d Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 22 May 2009 16:50:03 +0200 Subject: test what happens when changing to an invalid signal while state is active --- tests/auto/qstatemachine/tst_qstatemachine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp index c01d077..76c5de1 100644 --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp @@ -1704,6 +1704,12 @@ void tst_QStateMachine::signalTransitions() trans->setSenderObject(&emitter2); emitter2.emitSignalWithNoArg(); QTRY_COMPARE(finishedSpy.count(), 4); + + machine.start(); + QCoreApplication::processEvents(); + QTest::ignoreMessage(QtWarningMsg, "QSignalTransition: no such signal: SignalEmitter::noSuchSignal()"); + trans->setSignal(SIGNAL(noSuchSignal())); + QCOMPARE(trans->signal(), QByteArray(SIGNAL(noSuchSignal()))); } { QStateMachine machine; -- cgit v0.12