Changeset View
Changeset View
Standalone View
Standalone View
languages/clang/tests/test_duchain.cpp
Show First 20 Lines • Show All 221 Lines • ▼ Show 20 Line(s) | 212 | { | |||
---|---|---|---|---|---|
222 | QTest::newRow("typedef") | 222 | QTest::newRow("typedef") | ||
223 | << "namespace NS{typedef int type;} NS::type foo();" | 223 | << "namespace NS{typedef int type;} NS::type foo();" | ||
224 | << AbstractType::TypeAlias; | 224 | << AbstractType::TypeAlias; | ||
225 | } | 225 | } | ||
226 | 226 | | |||
227 | void TestDUChain::testInclude() | 227 | void TestDUChain::testInclude() | ||
228 | { | 228 | { | ||
229 | TestFile header("int foo() { return 42; }\n", "h"); | 229 | TestFile header("int foo() { return 42; }\n", "h"); | ||
230 | // NOTE: header is _not_ explictly being parsed, instead the impl job does that | 230 | // NOTE: header is _not_ explicitly being parsed, instead the impl job does that | ||
231 | 231 | | |||
232 | TestFile impl("#include \"" + header.url().byteArray() + "\"\n" | 232 | TestFile impl("#include \"" + header.url().byteArray() + "\"\n" | ||
233 | "int main() { return foo(); }", "cpp", &header); | 233 | "int main() { return foo(); }", "cpp", &header); | ||
234 | impl.parse(TopDUContext::AllDeclarationsContextsAndUses); | 234 | impl.parse(TopDUContext::AllDeclarationsContextsAndUses); | ||
235 | 235 | | |||
236 | auto implCtx = impl.topContext(); | 236 | auto implCtx = impl.topContext(); | ||
237 | QVERIFY(implCtx); | 237 | QVERIFY(implCtx); | ||
238 | 238 | | |||
▲ Show 20 Lines • Show All 1781 Lines • Show Last 20 Lines |