MCPcopy Create free account
hub / github.com/KDE/kdevelop / verifyInferiorStdout

Method verifyInferiorStdout

plugins/debuggercommon/tests/debuggertestbase.cpp:229–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229void DebuggerTestBase::verifyInferiorStdout(TestLaunchConfiguration& launchConfiguration,
230 const QStringList& expectedOutputLines)
231{
232 auto* const session = createTestDebugSession();
233 const QSignalSpy outputSpy(session, &MIDebugSession::inferiorStdoutLines);
234
235 START_DEBUGGING_E(session, launchConfiguration);
236 WAIT_FOR_STATE(session, IDebugSession::EndedState);
237
238 QCOMPARE_GT(outputSpy.count(), 0);
239
240 QStringList outputLines;
241 for (const auto& arguments : outputSpy) {
242 QCOMPARE_EQ(arguments.size(), 1); // MIDebugSession::inferiorStdoutLines() has one parameter
243 outputLines << arguments.constFirst().toStringList();
244 }
245 QCOMPARE(outputLines, expectedOutputLines);
246}
247
248void DebuggerTestBase::initTestCase()
249{

Callers

nothing calls this directly

Calls 3

countMethod · 0.45
sizeMethod · 0.45
toStringListMethod · 0.45

Tested by

no test coverage detected