@@ -879,11 +879,13 @@ void bar() {
879
879
880
880
::$global[[Global]] glob;
881
881
}
882
+ using Type = ns::$template[[Foo]]<int>;
882
883
)cpp" );
883
884
auto TU = TestTU::withCode (Test.code ());
884
885
auto Index = buildIndexWithSymbol (
885
886
{SymbolWithHeader{" ns::X" , " unittest:///x.h" , " \" x.h\" " },
886
- SymbolWithHeader{" Global" , " unittest:///global.h" , " \" global.h\" " }});
887
+ SymbolWithHeader{" Global" , " unittest:///global.h" , " \" global.h\" " },
888
+ SymbolWithHeader{" ns::Foo" , " unittest:///foo.h" , " \" foo.h\" " }});
887
889
TU.ExternalIndex = Index.get ();
888
890
889
891
EXPECT_THAT (
@@ -908,7 +910,12 @@ void bar() {
908
910
" no type named 'Global' in the global namespace" ),
909
911
DiagName (" typename_nested_not_found" ),
910
912
WithFix (Fix (Test.range (" insert" ), " #include \" global.h\"\n " ,
911
- " Add include \" global.h\" for symbol Global" )))));
913
+ " Add include \" global.h\" for symbol Global" ))),
914
+ AllOf (Diag (Test.range (" template" ),
915
+ " no template named 'Foo' in namespace 'ns'" ),
916
+ DiagName (" no_member_template" ),
917
+ WithFix (Fix (Test.range (" insert" ), " #include \" foo.h\"\n " ,
918
+ " Add include \" foo.h\" for symbol ns::Foo" )))));
912
919
}
913
920
914
921
TEST (IncludeFixerTest, MultipleMatchedSymbols) {
0 commit comments