harald
Qt
KDE
Posted by harald
 in Qt, KDE
 on Friday, September 16, 2005 @ 13:44

and welcome QTestLib. If you follow the Qt 4.1 snapshots, you might have noticed that QTestLib appeared as part of Qt. To ease transition, there’s a small updater tool (qtestlib/updater) that updates old autotests to use the new library.

Especially after being adopted by KDE, QTestLib got quite some feedback. Unhandled exceptions are now added to the test output and error reporting will stop after 2000 warning messages to prevent hanging tests from overflowing your harddrive. There were some API cleanups, especially the testdata creation was simplified a lot:

void MyTest::myFunc_data()
{
    QTest::addColumn<qstring>("aString");
    QTest::addColumn<int>("someInt");

    QTest::newRow("someTag") < < "someData" << 41;
    QTest::newRow("otherTag") << "moreData" << 42;
}

Note that the QtTestTable parameter is gone. With a “using namespace QTest” declaration, it’s even less to type :)

2 Responses to “bye bye QtTestLib”

» Posted by Brad Hards
 on Sunday, September 18, 2005 @ 08:11

Why is it still called version 2.0.0?

» Reply from harald
 on Monday, September 19, 2005 @ 10:54
harald

Because I haven’t had time to change it yet ;) Will be fixed tomorrow.



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.