AutoTest: Handle sub-typed TestCases correctly

Furthermore ensure that TestCase is really the Qml type
to avoid handling self-defined types as Quick Tests.

Task-number: QTCREATORBUG-17787
Change-Id: I08a6c70c3c166eefec6f24669cc225f568e51c7a
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Christian Stenger
2017-02-27 09:30:16 +01:00
parent e69c2eb2d5
commit 5708f3aa34
14 changed files with 195 additions and 13 deletions

View File

@@ -121,13 +121,13 @@ void AutoTestUnitTests::testCodeParser_data()
<< 1 << 0 << 0 << 0;
QTest::newRow("mixedAutoTestAndQuickTests")
<< QString(m_tmpDir->path() + "/mixed_atp/mixed_atp.pro")
<< 4 << 5 << 3 << 10;
<< 4 << 7 << 3 << 10;
QTest::newRow("plainAutoTestQbs")
<< QString(m_tmpDir->path() + "/plain/plain.qbs")
<< 1 << 0 << 0 << 0;
QTest::newRow("mixedAutoTestAndQuickTestsQbs")
<< QString(m_tmpDir->path() + "/mixed_atp/mixed_atp.qbs")
<< 4 << 5 << 3 << 10;
<< 4 << 7 << 3 << 10;
}
void AutoTestUnitTests::testCodeParserSwitchStartup()
@@ -173,7 +173,7 @@ void AutoTestUnitTests::testCodeParserSwitchStartup_data()
m_tmpDir->path() + "/mixed_atp/mixed_atp.qbs"});
QList<int> expectedAutoTests = QList<int>() << 1 << 4 << 1 << 4;
QList<int> expectedNamedQuickTests = QList<int>() << 0 << 5 << 0 << 5;
QList<int> expectedNamedQuickTests = QList<int>() << 0 << 7 << 0 << 7;
QList<int> expectedUnnamedQuickTests = QList<int>() << 0 << 3 << 0 << 3;
QList<int> expectedDataTagsCount = QList<int>() << 0 << 10 << 0 << 10;