Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.13.2
-
None
-
-
c9d2a8d69e9eed398ccc6e4973aae0158b869be4 (qt-creator/qt-creator/4.14)
Description
When defining test rows using QTest::addRow(), they are not recognized by the test integration. Only rows defined with QTest::newRow() are recognized.
Take as example this simple test:
#include <QtTest> #include <QObject> class Test : public QObject { Q_OBJECT private slots: void testMethod(); void testMethod_data(); }; void Test::testMethod() { QFETCH( int, dummy ); QVERIFY( dummy > -1 ); } void Test::testMethod_data() { QTest::addColumn<int>( "dummy" ); QTest::newRow( "row 1" ) << 17; QTest::addRow( "row 2" ) << 42; } QTEST_MAIN( Test ) #include "QtUnitTest.moc"
Only "row 1" is recognized: