Commit 001d4c10 authored by hjk's avatar hjk

Debugger: Remove use of setRunParameter() for state auto test

... which are disabled anyway.

Change-Id: Id15de0e5b766373570d89bacf02464e46f5b2b89
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 9ad888e6
......@@ -3699,19 +3699,16 @@ void DebuggerUnitTests::testStateMachine()
ProjectExplorerPlugin::buildProject(SessionManager::startupProject());
loop.exec();
ExecuteOnDestruction guard([] () {
EditorManager::closeAllEditors(false);
});
DebuggerRunParameters rp;
ExecuteOnDestruction guard([] { EditorManager::closeAllEditors(false); });
Target *t = SessionManager::startupProject()->activeTarget();
QVERIFY(t);
RunConfiguration *rc = t->activeRunConfiguration();
QVERIFY(rc);
rp.inferior = rc->runnable().as<StandardRunnable>();
rp.testCase = TestNoBoundsOfCurrentFunction;
auto debugger = DebuggerRunTool::createFromRunConfiguration(rc);
debugger->setRunParameters(rp);
debugger->setInferior(rc->runnable().as<StandardRunnable>());
debugger->setTestCase(TestNoBoundsOfCurrentFunction);
connect(debugger, &DebuggerRunTool::stopped,
&QTestEventLoop::instance(), &QTestEventLoop::exitLoop);
......
......@@ -286,6 +286,11 @@ void DebuggerRunTool::setNeedFixup(bool on)
m_runParameters.needFixup = on;
}
void DebuggerRunTool::setTestCase(int testCase)
{
m_runParameters.testCase = testCase;
}
void DebuggerRunTool::setInferior(const Runnable &runnable)
{
QTC_ASSERT(runnable.is<StandardRunnable>(), reportFailure(); return);
......
......@@ -121,6 +121,7 @@ public:
void setDeviceSymbolsRoot(const QString &deviceSymbolsRoot);
void setNeedFixup(bool on);
void setTestCase(int testCase);
signals:
void aboutToNotifyInferiorSetupOk();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment