diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2021-04-30 16:52:03 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2021-06-22 12:42:53 +0000 |
commit | 5b0889777a786698f801c2703f57b3648daeb40a (patch) | |
tree | 0023ebdf564f47138595526c648449590d62431f /src/plugins/autotest/autotestunittests.cpp | |
parent | 7e874544e62ed46a1ef1c17f89b598a879becd70 (diff) | |
download | qt-creator-5b0889777a786698f801c2703f57b3648daeb40a.tar.gz |
Add a test for a crash in ModelManagerInterface
Task-number: QTCREATORBUG-25350
Change-Id: I4ea31e7936cc77dcd8f3fc494b5ecbd83858a766
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/autotest/autotestunittests.cpp')
-rw-r--r-- | src/plugins/autotest/autotestunittests.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/plugins/autotest/autotestunittests.cpp b/src/plugins/autotest/autotestunittests.cpp index 6a6a9c1006..3ce4c69a28 100644 --- a/src/plugins/autotest/autotestunittests.cpp +++ b/src/plugins/autotest/autotestunittests.cpp @@ -308,13 +308,23 @@ void AutoTestUnitTests::testCodeParserBoostTest_data() << QString(m_tmpDir->path() + "/simple_boost/simple_boost.qbs") << QString(".qbs"); } -void AutoTestUnitTests::testStringTable() +static int executeScenario(const QString &scenario) { const PluginManager::ProcessData data = PluginManager::creatorProcessData(); - QStringList additionalArgs{ "-scenario", "TestStringTable" }; + QStringList additionalArgs{ "-scenario", scenario }; if (!data.m_args.contains("-settingspath") && !data.m_settingsPath.isEmpty()) additionalArgs << "-settingspath" << data.m_settingsPath; - QCOMPARE(QProcess::execute(data.m_executable, data.m_args + additionalArgs), 0); + return QProcess::execute(data.m_executable, data.m_args + additionalArgs); +} + +void AutoTestUnitTests::testStringTable() +{ + QCOMPARE(executeScenario("TestStringTable"), 0); +} + +void AutoTestUnitTests::testModelManagerInterface() +{ + QCOMPARE(executeScenario("TestModelManagerInterface"), 0); } } // namespace Internal |