| 101 | } |
| 102 | |
| 103 | void TestProblems::testBasicProblems() |
| 104 | { |
| 105 | // expected: |
| 106 | // <stdin>:1:13: error: expected ';' after class |
| 107 | // class Foo {} |
| 108 | // ^ |
| 109 | // ; |
| 110 | const QByteArray code = "class Foo {}"; |
| 111 | auto problems = parse(code); |
| 112 | QCOMPARE(problems.size(), 1); |
| 113 | QCOMPARE(problems[0]->diagnostics().size(), 0); |
| 114 | auto range = problems[0]->rangeInCurrentRevision(); |
| 115 | QCOMPARE(range.start(), KTextEditor::Cursor(0, 12)); |
| 116 | QCOMPARE(range.end(), KTextEditor::Cursor(0, 12)); |
| 117 | } |
| 118 | |
| 119 | void TestProblems::testBasicRangeSupport() |
| 120 | { |
nothing calls this directly
no test coverage detected