MCPcopy Create free account
hub / github.com/KDAB/hotspot / testSourceCodeModelNoFileName

Method testSourceCodeModelNoFileName

tests/modeltests/tst_models.cpp:383–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381 }
382
383 void testSourceCodeModelNoFileName()
384 {
385 QFETCH(Data::Symbol, symbol);
386
387 const auto actualBinaryFile = QFINDTESTDATA(symbol.binary);
388 symbol.actualPath = actualBinaryFile;
389
390 const auto tree = generateTree1();
391
392 Data::CallerCalleeResults results;
393 Data::callerCalleesFromBottomUpData(tree, &results);
394
395 SourceCodeModel model(nullptr);
396 QCOMPARE(model.columnCount(), SourceCodeModel::COLUMN_COUNT);
397 QCOMPARE(model.rowCount(), 0);
398
399 DisassemblyOutput disassemblyOutput =
400 DisassemblyOutput::disassemble(QStringLiteral("objdump"), QStringLiteral("x86_64"), {}, {}, {}, {}, symbol);
401 model.setDisassembly(disassemblyOutput, results);
402
403 // no source file name
404 QCOMPARE(model.columnCount(), SourceCodeModel::COLUMN_COUNT);
405 QCOMPARE(model.rowCount(), 0);
406 }
407
408 void testSourceCodeModelSourceCodeLineAssociation()
409 {

Callers

nothing calls this directly

Calls 4

generateTree1Function · 0.85
columnCountMethod · 0.45
rowCountMethod · 0.45
setDisassemblyMethod · 0.45

Tested by

no test coverage detected