The idea I've had for testing PageStack (but haven't gotten around to 
implementing yet) was to create a special page type (QML item) that tracks its 
own lifecycle. That way you can e.g. push a page and assert that it was 
activated properly, that the previous page was deactivated properly, etc. 
Asserting that the stack depth and currentPage properties changed is of course 
trivial but wouldn't really be a proper test.

I don't have time to do it at the moment but would be very happy to help if 
someone wants to take a stab at it!

Peppe

________________________________________
From: qt-components-bounces+petrus.lundqvist=nokia....@qt.nokia.com 
[qt-components-bounces+petrus.lundqvist=nokia....@qt.nokia.com] on behalf of 
Kellomaki Pertti (Nokia-MS/Tampere)
Sent: Tuesday, January 04, 2011 11:09
To: qt-compone...@trolltech.com
Subject: [Qt-components] Unit testing JS APIs

The current unit tests in qt-components deal with components that have
fairly simple APIs that map easily to C++. How about components that
have more complex APIs? For example, the PageStack API deals with
JavaScript arrays. I presume they can be dealt with from C++ but is
there something more convenient that could be used?
--
Pertti

_______________________________________________
Qt-components mailing list
Qt-components@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-components
_______________________________________________
Qt-components mailing list
Qt-components@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-components

Reply via email to