Nt Test C++ Classes
Unit testing: test functions, data-driven tests, signal spies and result logs.
Using the Module
target_link_libraries(app PRIVATE Nt::Test)
Nt Test runs the private slots of a QObject as test functions and logs the results. Headers keep Qt's names, so #include <QTest> and #include <QtTest/QSignalSpy> both work.
See Writing Tests with Nt Test for a complete test.
Classes
| QSignalSpy | The QSignalSpy class records the emissions of a signal. |
| QTest | The QTest namespace holds the functions behind Nt Test. |
| QTestData | The QTestData class is a row of test data under construction. |
| QTestEventLoop | The QTestEventLoop class runs an event loop in a test, with a timeout. |