homescreenapp/stateplugins/hsapplibrarystateplugin/tsrc/t_applibrarystate/src/t_applibrarystate.cpp
changeset 98 e6f74eb7f69f
parent 97 66b5fe3c07fd
equal deleted inserted replaced
97:66b5fe3c07fd 98:e6f74eb7f69f
   193     {
   193     {
   194         HsAppLibraryState appLibrary;
   194         HsAppLibraryState appLibrary;
   195 
   195 
   196         appLibrary.allCollectionsStateEntered();
   196         appLibrary.allCollectionsStateEntered();
   197         QCOMPARE(qobject_cast<QAbstractState *>(appLibrary.mAllCollectionsState),
   197         QCOMPARE(qobject_cast<QAbstractState *>(appLibrary.mAllCollectionsState),
   198             appLibrary.mHistoryTransaction->targetState());
   198             appLibrary.mHistoryTransition->targetState());
   199         QCOMPARE(appLibrary.mInstalledAppsState->transitions().length(), 1);
   199         QCOMPARE(appLibrary.mInstalledAppsState->transitions().length(), 1);
   200         QCOMPARE(appLibrary.mInstalledAppsState->transitions()[0]->sourceState(),
   200         QCOMPARE(appLibrary.mInstalledAppsState->transitions()[0]->sourceState(),
   201             qobject_cast<QState *>(appLibrary.mInstalledAppsState));
   201             qobject_cast<QState *>(appLibrary.mInstalledAppsState));
   202         QCOMPARE(appLibrary.mInstalledAppsState->transitions()[0]->targetState(),
   202         QCOMPARE(appLibrary.mInstalledAppsState->transitions()[0]->targetState(),
   203             qobject_cast<QAbstractState *>(appLibrary.mAllCollectionsState));
   203             qobject_cast<QAbstractState *>(appLibrary.mAllCollectionsState));
   204 
   204 
   205         appLibrary.allAppsStateEntered();
   205         appLibrary.allAppsStateEntered();
   206         QCOMPARE(qobject_cast<QAbstractState *>(appLibrary.mAllAppsState),
   206         QCOMPARE(qobject_cast<QAbstractState *>(appLibrary.mAllAppsState),
   207             appLibrary.mHistoryTransaction->targetState());
   207             appLibrary.mHistoryTransition->targetState());
   208         QCOMPARE(appLibrary.mInstalledAppsState->transitions().length(), 1);
   208         QCOMPARE(appLibrary.mInstalledAppsState->transitions().length(), 1);
   209         QCOMPARE(appLibrary.mInstalledAppsState->transitions()[0]->sourceState(),
   209         QCOMPARE(appLibrary.mInstalledAppsState->transitions()[0]->sourceState(),
   210             qobject_cast<QState *>(appLibrary.mInstalledAppsState));
   210             qobject_cast<QState *>(appLibrary.mInstalledAppsState));
   211         QCOMPARE(appLibrary.mInstalledAppsState->transitions()[0]->targetState(),
   211         QCOMPARE(appLibrary.mInstalledAppsState->transitions()[0]->targetState(),
   212             qobject_cast<QAbstractState *>(appLibrary.mAllAppsState));
   212             qobject_cast<QAbstractState *>(appLibrary.mAllAppsState));
   237 #ifdef UT_MEMORY_CHECK
   237 #ifdef UT_MEMORY_CHECK
   238     __UHEAP_MARK;
   238     __UHEAP_MARK;
   239 #endif//UT_MEMORY_CHECK
   239 #endif//UT_MEMORY_CHECK
   240 #endif//Q_OS_SYMBIAN
   240 #endif//Q_OS_SYMBIAN
   241     {
   241     {
   242 
       
   243         QFAIL("! Due to bug in hb wk36 we are forced to skip this test !");
       
   244         
       
   245         QScopedPointer<HbMainWindow> wind(new HbMainWindow);
   242         QScopedPointer<HbMainWindow> wind(new HbMainWindow);
   246         HsScene::setInstance( new HsScene(wind.data()) );
   243         HsScene::setInstance( new HsScene(wind.data()) );
   247         //create statemachine to perform transitions
   244         //create statemachine to perform transitions
   248         QScopedPointer<QStateMachine> machine(new QStateMachine(0));
   245         QScopedPointer<QStateMachine> machine(new QStateMachine(0));
   249 
   246