================
@@ -470,10 +490,164 @@ TEST_F(DefineOutlineTest, InCppFile) {
}
}
)cpp"},
+
+ // Criterion 1: Distance
+ {
+ R"cpp(
+ struct Foo {
+ void ignored1(); // Too far away
+ void ignored2(); // No definition
+ void ignored3() {} // Defined inline
+ void fo^o() {}
+ void neighbor();
+ };
+ void Foo::ignored1() {}
+ void Foo::neighbor() {}
+ )cpp",
+ R"cpp(
+ struct Foo {
+ void ignored1(); // Too far away
+ void ignored2(); // No definition
+ void ignored3() {} // Defined inline
+ void foo() ;
+ void neighbor();
+ };
+ void Foo::ignored1() {}
+ void Foo::foo() {}
+void Foo::neighbor() {}
+ )cpp",
+ SymbolSpecs{{"", "Foo", "ignored3", MakePos(4, 21), MakePos(4, 29),
----------------
HighCommander4 wrote:
Could you reformulate the tests to use the `DefineOutlineWorkspaceTest` fixture
added in https://github.com/llvm/llvm-project/pull/160391? That should avoid
any of this hard-coding of positions, manually building USRs, etc.
https://github.com/llvm/llvm-project/pull/128164
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits