| 117 | } |
| 118 | |
| 119 | void TestProblems::testBasicRangeSupport() |
| 120 | { |
| 121 | // expected: |
| 122 | // <stdin>:1:17: warning: expression result unused [-Wunused-value] |
| 123 | // int main() { (1 + 1); } |
| 124 | // ~ ^ ~ |
| 125 | const QByteArray code = "int main() { (1 + 1); }"; |
| 126 | auto problems = parse(code); |
| 127 | QCOMPARE(problems.size(), 1); |
| 128 | QCOMPARE(problems[0]->diagnostics().size(), 0); |
| 129 | auto range = problems[0]->rangeInCurrentRevision(); |
| 130 | QCOMPARE(range.start(), KTextEditor::Cursor(0, 14)); |
| 131 | QCOMPARE(range.end(), KTextEditor::Cursor(0, 19)); |
| 132 | } |
| 133 | |
| 134 | void TestProblems::testChildDiagnostics() |
| 135 | { |
nothing calls this directly
no test coverage detected