forked from qt-creator/qt-creator
Add information about how to write plugin tests and how to integrate unit tests. Change-Id: I13721f03c4c55a265a93f71a7c4d892f3e53a6bb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
22 lines
286 B
C++
22 lines
286 B
C++
#include "examplefunctions.h"
|
|
|
|
#include <QtTest>
|
|
|
|
class tst_MyTest : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
private slots:
|
|
void mytest();
|
|
};
|
|
|
|
void tst_MyTest::mytest()
|
|
{
|
|
// a failing test
|
|
QCOMPARE(Example::addOne(1), 2);
|
|
}
|
|
|
|
QTEST_GUILESS_MAIN(tst_MyTest)
|
|
|
|
#include "tst_mytest.moc"
|