Files
qt-creator/doc/qtcreatordev/examples/exampleplugin/tst_mytest.cpp
Eike Ziller cace5a57f2 Plugins: Add documentation about testing
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>
2023-02-28 15:42:48 +00:00

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"