Changeset View
Changeset View
Standalone View
Standalone View
languages/clang/tests/test_problems.cpp
Show First 20 Lines • Show All 408 Lines • ▼ Show 20 Line(s) | 374 | { | |||
---|---|---|---|---|---|
409 | QTest::newRow("non-ascii-todo") | 409 | QTest::newRow("non-ascii-todo") | ||
410 | << "/* TODO: 例えば */" | 410 | << "/* TODO: 例えば */" | ||
411 | << ExpectedTodos{{"TODO: 例えば", {0, 3}, {0, 12}}}; | 411 | << ExpectedTodos{{"TODO: 例えば", {0, 3}, {0, 12}}}; | ||
412 | } | 412 | } | ||
413 | 413 | | |||
414 | void TestProblems::testProblemsForIncludedFiles() | 414 | void TestProblems::testProblemsForIncludedFiles() | ||
415 | { | 415 | { | ||
416 | TestFile header(QStringLiteral("#pragma once\n//TODO: header\n"), QStringLiteral("h")); | 416 | TestFile header(QStringLiteral("#pragma once\n//TODO: header\n"), QStringLiteral("h")); | ||
417 | TestFile file("#include \"" + header.url().byteArray() + "\"\n//TODO: source\n", QStringLiteral("cpp")); | 417 | TestFile file("#include \"" + header.url().str() + "\"\n//TODO: source\n", QStringLiteral("cpp")); | ||
418 | 418 | | |||
419 | file.parse(TopDUContext::Features(TopDUContext::AllDeclarationsContextsAndUses|TopDUContext::AST | TopDUContext::ForceUpdate)); | 419 | file.parse(TopDUContext::Features(TopDUContext::AllDeclarationsContextsAndUses|TopDUContext::AST | TopDUContext::ForceUpdate)); | ||
420 | QVERIFY(file.waitForParsed(5000)); | 420 | QVERIFY(file.waitForParsed(5000)); | ||
421 | 421 | | |||
422 | { | 422 | { | ||
423 | DUChainReadLocker lock; | 423 | DUChainReadLocker lock; | ||
424 | QVERIFY(file.topContext()); | 424 | QVERIFY(file.topContext()); | ||
425 | 425 | | |||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |