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

Method testFinalLocation

kdevplatform/shell/tests/test_detectedproblem.cpp:120–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void TestDetectedProblem::testFinalLocation()
121{
122 QString TESTPATH = QStringLiteral("/just/a/bogus/path/to/a/fake/document");
123 int TESTLINE = 9001;
124 int TESTCOLUMN = 1337;
125
126 DocumentRange range;
127 range.document = IndexedString(TESTPATH);
128 range.setBothLines(TESTLINE);
129 range.setBothColumns(TESTCOLUMN);
130
131 m_problem->setFinalLocation(range);
132
133 QCOMPARE(TESTPATH, m_problem->finalLocation().document.str());
134 QCOMPARE(TESTLINE, m_problem->finalLocation().start().line());
135 QCOMPARE(TESTLINE, m_problem->finalLocation().end().line());
136 QCOMPARE(TESTCOLUMN, m_problem->finalLocation().start().column());
137 QCOMPARE(TESTCOLUMN, m_problem->finalLocation().end().column());
138}
139
140void TestDetectedProblem::testDiagnostics()
141{

Callers

nothing calls this directly

Calls 8

strMethod · 0.80
IndexedStringClass · 0.50
setFinalLocationMethod · 0.45
finalLocationMethod · 0.45
lineMethod · 0.45
startMethod · 0.45
endMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected