summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-05-07 08:24:00 (GMT)
committerEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-05-07 08:24:00 (GMT)
commit74cdd7c31e91e15d5941ece11a6bdf1c4e1b2309 (patch)
tree30eaf21ddb02b986f90e6de0f3e01dc1f08c0f45 /tests
parent7bfe66e825e98b049dfdb0b6008e3f334909eec7 (diff)
downloadQt-74cdd7c31e91e15d5941ece11a6bdf1c4e1b2309.zip
Qt-74cdd7c31e91e15d5941ece11a6bdf1c4e1b2309.tar.gz
Qt-74cdd7c31e91e15d5941ece11a6bdf1c4e1b2309.tar.bz2
Fix tests for history state and entering root state
Change expectation for entering the root state. We should never have the root state in the configuration. Also fix the expected error message in historyStateHasNowhereToGo since this has changed along with the API.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qstatemachine/tst_qstatemachine.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp
index 94afe51..8026d6e 100644
--- a/tests/auto/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp
@@ -264,16 +264,14 @@ void tst_QStateMachine::transitionToRootState()
machine.start();
QCoreApplication::processEvents();
- QCOMPARE(machine.configuration().count(), 2);
+ QCOMPARE(machine.configuration().count(), 1);
QVERIFY(machine.configuration().contains(initialState));
- QVERIFY(machine.configuration().contains(machine.rootState()));
machine.postEvent(new QEvent(QEvent::User));
QCoreApplication::processEvents();
- QCOMPARE(machine.configuration().count(), 2);
+ QCOMPARE(machine.configuration().count(), 1);
QVERIFY(machine.configuration().contains(initialState));
- QVERIFY(machine.configuration().contains(machine.rootState()));
}
void tst_QStateMachine::transitionEntersParent()
@@ -880,7 +878,7 @@ void tst_QStateMachine::historyStateHasNowhereToGo()
QCOMPARE(machine.configuration().count(), 1);
QVERIFY(machine.configuration().contains(machine.errorState()));
QCOMPARE(machine.error(), QStateMachine::NoDefaultStateInHistoryState);
- QCOMPARE(machine.errorString(), QString::fromLatin1("Missing transition from history state 'historyState'"));
+ QCOMPARE(machine.errorString(), QString::fromLatin1("Missing default state in history state 'historyState'"));
}
void tst_QStateMachine::brokenStateIsNeverEntered()