2 writes to Symbol
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CompilationTestUtils.cs (2)
287summary.Symbol = symbolInfo.Symbol; 329summary.Symbol = symbolInfo.Symbol;
804 references to Symbol
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (143)
Semantics\ExpressionBodiedMemberTests.cs (16)
79var semanticSymbol = semanticInfo.Symbol; 105Assert.Null(semanticInfo.Symbol); 124var sym = Assert.IsType<SourcePropertySymbol>(info.Symbol.GetSymbol()); 140Assert.Equal("i", semanticInfo.Symbol.Name); 141Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 158Assert.Equal("c", semanticInfo.Symbol.Name); 159Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 173Assert.Equal("s", semanticInfo.Symbol.Name); 174Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 208var sym = semanticInfo.Symbol; 230var semanticSymbol = semanticInfo.Symbol; 261Assert.Equal("t", semanticInfo.Symbol.Name); 262var m = semanticInfo.Symbol.ContainingSymbol.GetSymbol<SourceOrdinaryMethodSymbol>(); 267Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 286var semanticSymbol = semanticInfo.Symbol; 319var semanticSymbol = semanticInfo.Symbol;
Semantics\FunctionPointerTests.cs (1)
3968Assert.Equal("delegate*<?, System.Void>", semanticInfo.Symbol.ToTestDisplayString(includeNonNullable: false));
Semantics\InteractiveSemanticModelTests.cs (11)
127var symbol = bindInfo.Symbol; 142var symbol = bindInfo.Symbol; 163Assert.Equal("System.Random", semanticInfo.Symbol.ToTestDisplayString()); 164Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 188Assert.Null(semanticInfo.Symbol); 214Assert.Equal("Script.var", semanticInfo.Symbol.ToTestDisplayString()); 215Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 242Assert.Null(semanticInfo.Symbol); 266Assert.Equal("c", semanticInfo.Symbol.Name); 267Assert.Equal(SymbolKind.RangeVariable, semanticInfo.Symbol.Kind); 351var method = bindInfo.Symbol.ToDisplayString();
Semantics\InterpolationTests.cs (1)
4619AssertEx.Equal("System.String System.String.op_Addition(System.String left, System.String right)", semanticInfo.Symbol.ToTestDisplayString());
Semantics\QueryTests.cs (27)
1486Assert.Equal(x, model.GetSemanticInfoSummary(xPy.Left).Symbol); 1487Assert.Equal(y, model.GetSemanticInfoSummary(xPy.Right).Symbol); 1488Assert.Equal(z, model.GetSemanticInfoSummary(xPyPz.Right).Symbol); 1695Assert.Equal(x, model.GetSemanticInfoSummary(xPy.Left).Symbol); 1696Assert.Equal(y, model.GetSemanticInfoSummary(xPy.Right).Symbol); 1697Assert.Equal(z, model.GetSemanticInfoSummary(xPyPz.Right).Symbol); 1777Assert.Equal("OrderByDescending", oinfo0.Symbol.Name); 1780Assert.Equal("ThenBy", oinfo1.Symbol.Name); 2180Assert.Equal(SymbolKind.RangeVariable, info.Symbol.Kind); 2182var m = (IMethodSymbol)info2.Symbol; 2210Assert.Equal(SymbolKind.RangeVariable, info.Symbol.Kind); 2237Assert.Equal(SymbolKind.RangeVariable, info.Symbol.Kind); 2238Assert.Equal("x", info.Symbol.Name); 2243Assert.Equal(SymbolKind.RangeVariable, info.Symbol.Kind); 2244Assert.Equal("w", info.Symbol.Name); 2249Assert.Equal("System.Int32 System.Int32.op_Addition(System.Int32 left, System.Int32 right)", info2.Symbol.ToTestDisplayString()); 2398Assert.Null(symbolInfoForSelect.Symbol); 2432Assert.Equal(names[count++], symbolInfo.Symbol.Name); 2487Assert.Null(symbolInfoForSelect.Symbol); 2551Assert.Null(symbolInfoForSelect.Symbol); 2586Assert.Null(symbolInfoForOrdering.Symbol); 2719Assert.Null(symbolInfo.Symbol); 2745Assert.Null(symbolInfo.Symbol); 2907Assert.Equal("Select", infoSelect.Symbol.Name); 2940Assert.Equal("Select", infoSelect.Symbol.Name); 3477Assert.Equal(x, speculativeModel.GetSemanticInfoSummary(selectExpression).Symbol); 3610Assert.Equal(names[count++], symbolInfo.Symbol.Name);
Semantics\RawInterpolationTests_Handler.cs (1)
2920AssertEx.Equal("System.String System.String.op_Addition(System.String left, System.String right)", semanticInfo.Symbol.ToTestDisplayString());
Semantics\ScriptSemanticsTests.cs (2)
248Assert.Null(summary.Symbol); 565Assert.Null(summary.Symbol);
Semantics\StackAllocInitializerTests.cs (47)
373Assert.Null(stackallocInfo.Symbol); 379Assert.Null(element0Info.Symbol); 387Assert.Null(stackallocInfo.Symbol); 393Assert.Equal("<empty anonymous type>..ctor()", element0Info.Symbol.ToTestDisplayString()); 401Assert.Null(stackallocInfo.Symbol); 407Assert.Equal("Test.S s", element0Info.Symbol.ToTestDisplayString()); 449Assert.Null(stackallocInfo.Symbol); 455Assert.Null(element0Info.Symbol); 463Assert.Null(stackallocInfo.Symbol); 469Assert.Equal("<empty anonymous type>..ctor()", element0Info.Symbol.ToTestDisplayString()); 477Assert.Null(stackallocInfo.Symbol); 483Assert.Equal("Test.S s", element0Info.Symbol.ToTestDisplayString()); 2365Assert.Null(stackallocInfo.Symbol); 2371Assert.Null(element0Info.Symbol); 2377Assert.Null(element1Info.Symbol); 2383Assert.Null(sizeInfo.Symbol); 2393Assert.Null(stackallocInfo.Symbol); 2399Assert.Null(element0Info.Symbol); 2405Assert.Null(element1Info.Symbol); 2411Assert.Null(sizeInfo.Symbol); 2421Assert.Null(stackallocInfo.Symbol); 2427Assert.Null(element0Info.Symbol); 2433Assert.Null(element1Info.Symbol); 2439Assert.Null(sizeInfo.Symbol); 2471Assert.Null(stackallocInfo.Symbol); 2477Assert.Null(element0Info.Symbol); 2483Assert.Null(element1Info.Symbol); 2493Assert.Null(stackallocInfo.Symbol); 2499Assert.Null(element0Info.Symbol); 2505Assert.Null(element1Info.Symbol); 2515Assert.Null(stackallocInfo.Symbol); 2521Assert.Null(element0Info.Symbol); 2527Assert.Null(element1Info.Symbol); 2571Assert.Null(stackallocInfo.Symbol); 2577Assert.Null(element0Info.Symbol); 2583Assert.Null(element1Info.Symbol); 2589Assert.Null(sizeInfo.Symbol); 2599Assert.Null(stackallocInfo.Symbol); 2605Assert.Equal("ref System.Int16 System.Span<System.Int16>.this[System.Int32 i] { get; }", element0Info.Symbol.ToTestDisplayString()); 2611Assert.Equal("System.Int32 System.Span<System.Int16>.Length { get; }", element1Info.Symbol.ToTestDisplayString()); 2617Assert.Equal("System.Int32 System.Span<System.Int16>.Length { get; }", sizeInfo.Symbol.ToTestDisplayString()); 2655Assert.Null(stackallocInfo.Symbol); 2661Assert.Null(element0Info.Symbol); 2667Assert.Null(element1Info.Symbol); 2677Assert.Null(stackallocInfo.Symbol); 2683Assert.Equal("ref System.Double System.Span<System.Double>.this[System.Int32 i] { get; }", element0Info.Symbol.ToTestDisplayString()); 2689Assert.Equal("System.Int32 System.Span<System.Double>.Length { get; }", element1Info.Symbol.ToTestDisplayString());
Semantics\UnsafeTests.cs (37)
7858var receiverSymbol = receiverSummary.Symbol; 7870Assert.Equal(structMethod1, methodGroupSummary.Symbol.GetSymbol()); 7879Assert.Equal(structMethod1, callSummary.Symbol.GetSymbol()); 7925var receiverSymbol = receiverSummary.Symbol; 7937Assert.Equal(structMethod1, methodGroupSummary.Symbol.GetSymbol()); // Have enough info for overload resolution. 7944Assert.Equal(structMethod1, callSummary.Symbol.GetSymbol()); // Have enough info for overload resolution. 8169var receiverSymbol = receiverSummary.Symbol; 8181var indexSymbol = indexSummary.Symbol; 8193Assert.Null(accessSummary.Symbol); 8236var receiverSymbol = receiverSummary.Symbol; 8248var indexSymbol = indexSummary.Symbol; 8252Assert.Null(accessSummary.Symbol); 8294var receiverSymbol = receiverSummary.Symbol; 8306var indexSymbol = indexSummary.Symbol; 8310Assert.Null(accessSummary.Symbol); 8867Assert.Null(summary.Symbol); 8871Assert.NotNull(summary.Symbol); 8872var summaryMethod = (IMethodSymbol)summary.Symbol; 8914Assert.Equal("System.Int64 System.Byte*.op_Subtraction(System.Byte* left, System.Byte* right)", summary.Symbol.ToTestDisplayString()); 9329Assert.Null(summary.Symbol); 9333Assert.NotNull(summary.Symbol); 9334var summaryMethod = (IMethodSymbol)summary.Symbol; 10243Assert.Null(summary0.Symbol); 10248Assert.Equal(arraySymbol, summary1.Symbol.GetSymbol()); 10252Assert.Null(summary2.Symbol); 10310Assert.Null(summary0.Symbol); 10317Assert.Equal(arraySymbol, summary1.Symbol.GetSymbol()); 10323Assert.Null(summary2.Symbol); 10631var type = typeSummary.Symbol as ITypeSymbol; 10646Assert.Null(sizeOfSummary.Symbol); 10693var type = typeSummary.Symbol as ITypeSymbol; 10708Assert.Null(sizeOfSummary.Symbol); 10753var type = typeSummary.Symbol as ITypeSymbol; 10768Assert.Null(sizeOfSummary.Symbol); 11314Assert.Null(stackAllocSummary.Symbol); 11326Assert.Equal(typeSummary.Symbol, typeSummary.Type); 11338var countSymbol = (ILocalSymbol)countSummary.Symbol;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (658)
Compilation\GetSemanticInfoTests.cs (25)
980Assert.Equal("System.Boolean System.Int32.op_Equality(System.Int32 left, System.Int32 right)", info.Symbol.ToTestDisplayString()); 1004Assert.Equal("System.Boolean System.Int32.op_LessThan(System.Int32 left, System.Int32 right)", info.Symbol.ToTestDisplayString()); 1026IMethodSymbol methodSymbol = (IMethodSymbol)bindInfo.Symbol; 1169var parameterSymbol = (IParameterSymbol)bindInfo.Symbol; 1198var parameterSymbol = (IParameterSymbol)bindInfo.Symbol; 1222Assert.Null(bindInfo.Symbol); 1245Assert.Equal(systemActionType, bindInfo.Symbol); 1273Assert.Equal(eventSymbol, bindInfo.Symbol); 1301Assert.Equal(eventSymbol, bindInfo.Symbol); 1328Assert.Equal(eventSymbol.AddMethod, bindInfo.Symbol); 1355Assert.Equal(eventSymbol.AddMethod, bindInfo.Symbol); 1378Assert.Null(bindInfo.Symbol); 1418Assert.Equal(indexerSymbol, bindInfo.Symbol); 1459Assert.Null(bindInfo.Symbol); 1493Assert.Null(bindInfo.Symbol); 1529Assert.Null(bindInfo.Symbol); 1560var symbol = bindInfo.Symbol; 1582var symbol = bindInfo.Symbol; 1610var symbol = bindInfo.Symbol; 1706var symbol = bindInfo.Symbol; 1741var symbol = bindInfo.Symbol; 1776var symbol = bindInfo.Symbol; 1812var symbol = bindInfo.Symbol; 3556Assert.Equal(SymbolKind.Namespace, info.Symbol.Kind); 4304Assert.Null(info.Symbol);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (26)
2259Assert.NotNull(info.Symbol); 2260Assert.Equal("F", info.Symbol.Name); 2295Assert.Null(info.Symbol); 2331Assert.Null(info.Symbol); 2367Assert.Null(info.Symbol); 2404Assert.NotNull(info.Symbol); 2434Assert.NotNull(info.Symbol); 2466Assert.NotNull(info.Symbol); 2503Assert.NotNull(info.Symbol); 2504Assert.Equal("System", info.Symbol.Name); 2570Assert.NotNull(info.Symbol); 2599Assert.NotNull(info.Symbol); 2600Assert.Equal("System", info.Symbol.Name); 2624Assert.Null(info.Symbol); 2764Assert.NotNull(info.Symbol); 2817var n1 = info.Symbol; 3276Assert.NotNull(initInfo.Symbol); 3277Assert.Equal("C.N(int)", initInfo.Symbol.ToDisplayString()); 3289Assert.NotNull(argInfo.Symbol); 3290Assert.Equal("C.N()", argInfo.Symbol.ToDisplayString()); 3671Assert.Equal(SymbolKind.Parameter, info.Symbol.Kind); 3672var parameter = (IParameterSymbol)info.Symbol; 3712var symbol = model.GetSemanticInfoSummary(gotoStatement.Expression).Symbol; 3849Assert.Equal(SymbolKind.Method, symbolInfo.Symbol.Kind); 4092Assert.Equal(fieldB, semanticInfoExpression.Symbol); 4097Assert.Equal("System.Console", semanticInfoExpression.Symbol.ToTestDisplayString());
Compilation\SemanticModelGetSemanticInfoTests.cs (542)
51Assert.Null(semanticInfo.Symbol); 90Assert.Equal("K<System.Int32>", semanticInfo.Symbol.ToTestDisplayString()); 91Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 121Assert.Null(semanticInfo.Symbol); 155Assert.Null(semanticInfo.Symbol); 196Assert.Null(semanticInfo.Symbol); 237Assert.Null(semanticInfo.Symbol); 277Assert.Null(semanticInfo.Symbol); 313Assert.Null(semanticInfo.Symbol); 342var symbol = semanticInfo.Symbol; 373Assert.Null(semanticInfo.Symbol); 406Assert.Equal("Test.Base", semanticInfo.Symbol.ToTestDisplayString()); 430var symbol = semanticInfo.Symbol; 466Assert.Null(semanticInfo.Symbol); 506Assert.Null(semanticInfo.Symbol); 549Assert.Null(semanticInfo.Symbol); 597Assert.Null(semanticInfo.Symbol); 645Assert.Null(semanticInfo.Symbol); 698Assert.Null(semanticInfo.Symbol); 729Assert.NotNull(semanticInfo.Symbol); 765Assert.NotNull(semanticInfo.Symbol); 799Assert.Null(semanticInfo.Symbol); 838Assert.Null(semanticInfo.Symbol); 924Utils.CheckSymbol(semanticInfo.Symbol, 974Utils.CheckSymbol(semanticInfo.Symbol, 993Assert.Null(semanticInfo.Symbol); 1013Assert.Null(semanticInfo.Symbol); 1033Assert.Null(semanticInfo.Symbol); 1057Utils.CheckSymbol(semanticInfo.Symbol, 1078Assert.Null(semanticInfo.Symbol); 1452Utils.CheckSymbol(semanticInfo.Symbol, "string A.P[int x, string y]"); 1470Utils.CheckSymbol(semanticInfo.Symbol, "string A.P[int x, string y]"); 1482Utils.CheckSymbol(semanticInfo.Symbol, "object A.P[int x = 0]"); 1497Assert.Null(semanticInfo.Symbol); 1518Assert.Null(semanticInfo.Symbol); 1591Utils.CheckSymbol(semanticInfo.Symbol, "object B.P1[object index]"); 1606Utils.CheckSymbol(semanticInfo.Symbol, "object B.P2[string index]"); 1621Utils.CheckSymbol(semanticInfo.Symbol, "object A.P3[object index]"); 1647Assert.Equal("C this", semanticInfo.Symbol.ToTestDisplayString()); 1648Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 1691Assert.Equal("System", semanticInfo.Symbol.ToTestDisplayString()); 1692Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 1723Assert.Equal("System.Int32 i", semanticInfo.Symbol.ToTestDisplayString()); 1724Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 1752Assert.Null(semanticInfo.Symbol); 1783Assert.Equal("System.Int32 System.Int32.op_Increment(System.Int32 value)", semanticInfo.Symbol.ToTestDisplayString()); 1812Assert.Null(semanticInfo.Symbol); 1842Assert.Null(semanticInfo.Symbol); 1872Assert.Null(semanticInfo.Symbol); 1902Assert.Equal("System.String System.String.op_Addition(System.String left, System.Object right)", semanticInfo.Symbol.ToTestDisplayString()); 1931Assert.Equal("System.String System.String.op_Addition(System.String left, System.Object right)", semanticInfo.Symbol.ToTestDisplayString()); 1961Assert.Null(semanticInfo.Symbol); 1991Assert.Equal("System.UInt32 System.UInt32.op_Addition(System.UInt32 left, System.UInt32 right)", semanticInfo.Symbol.ToTestDisplayString()); 2021Assert.Equal("ulong.operator +(ulong, ulong)", semanticInfo.Symbol.ToString()); 2053Assert.Equal("System.Boolean System.Boolean.op_LogicalNot(System.Boolean value)", semanticInfo.Symbol.ToTestDisplayString()); 2085Assert.Null(semanticInfo.Symbol); 2122Assert.Equal("System.Exception e", semanticInfo.Symbol.ToTestDisplayString()); 2123Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 2155Assert.Equal("void Program.Ref<System.Object>(System.Object array)", semanticInfo.Symbol.ToTestDisplayString()); 2156Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2195Assert.Equal("N1.I1", semanticInfo.Symbol.ToTestDisplayString()); 2196Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 2223Assert.Null(semanticInfo.Symbol); 2267Assert.Equal("A.Goo", semanticInfo.Symbol.ToTestDisplayString()); 2268Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 2302Assert.Equal("System.String System.Enum.ToString()", semanticInfo.Symbol.ToTestDisplayString()); 2303Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2352Assert.Equal("System.Int32 N1.I1.Method()", semanticInfo.Symbol.ToTestDisplayString()); 2353Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2398Assert.Equal("void NGoo.Goo.method()", semanticInfo.Symbol.ToTestDisplayString()); 2399Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2441Assert.Equal("void BaseClass.MyMeth()", semanticInfo.Symbol.ToTestDisplayString()); 2442Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2496Assert.Equal("System.Int32 B.goo(ref System.String x, System.Int64 y, System.Int64 z)", semanticInfo.Symbol.ToTestDisplayString()); 2497Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2548Assert.Equal("System.Int32 B.goo(params System.Int32[] x)", semanticInfo.Symbol.ToTestDisplayString()); 2549Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2580Assert.Null(semanticInfo.Symbol); 2616Assert.Equal("A", semanticInfo.Symbol.ToTestDisplayString()); 2617Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 2653Assert.Equal("A..ctor(System.Int32 x)", semanticInfo.Symbol.ToTestDisplayString()); 2654Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2694Assert.Null(semanticInfo.Symbol); 2735Assert.Null(semanticInfo.Symbol); 2785Assert.Null(semanticInfo.Symbol); 2831Assert.Null(semanticInfo.Symbol); 2874Assert.Equal("System.Int32 A.f(System.String z)", semanticInfo.Symbol.ToTestDisplayString()); 2875Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2910Assert.Equal("System.Int32 A.f(System.String z)", semanticInfo.Symbol.ToTestDisplayString()); 2911Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2950Assert.Null(semanticInfo.Symbol); 2986Assert.Null(semanticInfo.Symbol); 3020Assert.Null(semanticInfo.Symbol); 3076Assert.Equal("System.String MySystem.IO.StreamReader.NullStreamReader.ReadLine()", semanticInfo.Symbol.ToTestDisplayString()); 3077Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3121Assert.Equal("System.String ISomething.ToString()", semanticInfo.Symbol.ToTestDisplayString()); 3122Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3161Assert.Equal("void MyClass.MyMeth()", semanticInfo.Symbol.ToTestDisplayString()); 3162Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3203Assert.Equal("void D.M2(System.Int32 x)", semanticInfo.Symbol.ToTestDisplayString()); 3204Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3249Assert.Equal("void C2.M1()", semanticInfo.Symbol.ToTestDisplayString()); 3250Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3288Assert.Equal("void TestClass.Test()", semanticInfo.Symbol.ToTestDisplayString()); 3289Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3324Assert.Equal("void IB.M()", semanticInfo.Symbol.ToTestDisplayString()); 3325Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3361Assert.Equal("void IR.M()", semanticInfo.Symbol.ToTestDisplayString()); 3362Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3398Assert.Equal("System.Int32 Test.Meth1()", semanticInfo.Symbol.ToTestDisplayString()); 3399Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3429Assert.Null(semanticInfo.Symbol); 3461Assert.Null(semanticInfo.Symbol); 3496Assert.Equal("System.Void", semanticInfo.Symbol.ToTestDisplayString()); 3497Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3527Assert.Null(semanticInfo.Symbol); 3559Assert.Equal("System", semanticInfo.Symbol.ToTestDisplayString()); 3560Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 3593Assert.Equal("N1.N2.A1", semanticInfo.Symbol.ToTestDisplayString()); 3594Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3631Assert.Equal("H<A>", semanticInfo.Symbol.ToTestDisplayString()); 3632Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3675Assert.Equal("H<H<A>, H<A>>", semanticInfo.Symbol.ToTestDisplayString()); 3676Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3709Assert.Equal("N1.N2.A2.A1", semanticInfo.Symbol.ToTestDisplayString()); 3710Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3743Assert.Equal("N1.NC1.A1", semanticInfo.Symbol.ToTestDisplayString()); 3744Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3777Assert.Equal("A.B", semanticInfo.Symbol.ToTestDisplayString()); 3778Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3807Assert.Equal("DateTime dt", semanticInfo.Symbol.ToTestDisplayString()); 3808Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 3839Assert.Null(semanticInfo.Symbol); 3868Assert.Equal("C..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 3869Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3903Assert.Equal("T.T", semanticInfo.Symbol.ToTestDisplayString()); 3904Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3940Assert.Null(semanticInfo.Symbol); 3976Assert.Null(semanticInfo.Symbol); 4011Assert.Equal("A<B.Y.Z>", semanticInfo.Symbol.ToTestDisplayString()); 4012Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 4042Assert.Equal("System.Int32 x", semanticInfo.Symbol.ToTestDisplayString()); 4043Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 4073Assert.Null(semanticInfo.Symbol); 4110Assert.Equal("System", semanticInfo.Symbol.ToTestDisplayString()); 4111Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 4139Assert.Equal("System.Int32 System.String.Length { get; }", semanticInfo.Symbol.ToTestDisplayString()); 4140Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 4163Assert.Null(semanticInfo.Symbol); 4189Assert.Null(semanticInfo.Symbol); 4217Assert.Null(semanticInfo.Symbol); 4250Assert.Equal("C<T1>..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 4284Assert.Null(semanticInfo.Symbol); 4322Assert.Equal("B..ctor(System.String a, System.String b)", semanticInfo.Symbol.ToTestDisplayString()); 4323Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 4376Assert.Null(semanticInfo.Symbol); 4407Assert.NotNull(semanticInfo.Symbol); 4408Assert.Equal("A", semanticInfo.Symbol.ToTestDisplayString()); 4409Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 4447Assert.NotNull(semanticInfo.Symbol); 4478Assert.Equal("System.Object value", semanticInfo.Symbol.ToTestDisplayString()); 4479Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 4503Assert.Equal("System.String value", semanticInfo.Symbol.ToTestDisplayString()); 4521Assert.Equal("System.Int16 i", semanticInfo.Symbol.ToTestDisplayString()); 4545var symbol = semanticInfo.Symbol; 4573Assert.Equal("System.Int32 j", semanticInfo.Symbol.ToTestDisplayString()); 4574Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 4582var symbol = (ILocalSymbol)semanticInfo.Symbol; 4611Assert.Equal("System.Int32 C.j", semanticInfo.Symbol.ToTestDisplayString()); 4612Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4620var symbol = (IFieldSymbol)semanticInfo.Symbol; 4647Assert.Equal("System.Int32 System.Int32.op_Addition(System.Int32 left, System.Int32 right)", semanticInfo.Symbol.ToTestDisplayString()); 4677Assert.Equal("E.C", semanticInfo.Symbol.ToTestDisplayString()); 4678Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4686var symbol = (IFieldSymbol)semanticInfo.Symbol; 4715Assert.Equal("E.Y", semanticInfo.Symbol.ToTestDisplayString()); 4716Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4723var symbol = (IFieldSymbol)semanticInfo.Symbol; 4751Assert.Equal("E.B", semanticInfo.Symbol.ToTestDisplayString()); 4752Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4759var symbol = (IFieldSymbol)semanticInfo.Symbol; 4787Assert.Equal("E.D", semanticInfo.Symbol.ToTestDisplayString()); 4788Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4795var symbol = (IFieldSymbol)semanticInfo.Symbol; 4818Assert.Equal("E.B", semanticInfo.Symbol.ToTestDisplayString()); 4819Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4827var symbol = (IFieldSymbol)semanticInfo.Symbol; 4855Assert.Equal("System.String format", semanticInfo.Symbol.ToTestDisplayString()); 4856Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 4882Assert.Equal("System.Int32 x", semanticInfo.Symbol.ToTestDisplayString()); 4883Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 4885Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)semanticInfo.Symbol.ContainingSymbol).MethodKind); 4891Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.ContainingSymbol.Kind); 4892Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)semanticInfo.Symbol.ContainingSymbol).MethodKind); 4921Assert.Null(semanticInfo.Symbol); 4968Assert.Null(semanticInfo.Symbol); 5020Assert.Null(semanticInfo.Symbol); 5071Assert.Equal("Class1", semanticInfo.Symbol.ToTestDisplayString()); 5110Assert.Null(semanticInfo.Symbol); 5157Assert.Null(semanticInfo.Symbol); 5203Assert.Equal("Class1..ctor(System.Int32 a, System.Int64 b)", semanticInfo.Symbol.ToTestDisplayString()); 5204Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5243Assert.Equal("Class1", semanticInfo.Symbol.ToTestDisplayString()); 5244Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 5282Assert.Equal("Class1..ctor(System.Int32 a, System.Int64 b)", semanticInfo.Symbol.ToTestDisplayString()); 5283Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5324Assert.Equal("Class1..ctor(System.Int32 a, System.Int64 b)", semanticInfo.Symbol.ToTestDisplayString()); 5325Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5406Assert.Null(semanticInfo.Symbol); 5448Assert.Null(semanticInfo.Symbol); 5484Assert.Equal("System.Boolean System.Int32.op_Equality(System.Int32 left, System.Int32 right)", semanticInfo.Symbol.ToTestDisplayString()); 5513Assert.Equal("System.Boolean System.Int32.op_LessThan(System.Int32 left, System.Int32 right)", semanticInfo.Symbol.ToTestDisplayString()); 5546Assert.Equal("System.Int32 x", semanticInfo.Symbol.ToTestDisplayString()); 5547Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 5553Assert.True(semanticInfo.Symbol.GetSymbol().IsFromCompilation(compilation)); 5578Assert.Equal("System.Int32 C.x", semanticInfo.Symbol.ToTestDisplayString()); 5579Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 5610Assert.Equal("System.Int32 C.x", semanticInfo.Symbol.ToTestDisplayString()); 5611Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 5636Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5660Assert.Equal("lambda expression", semanticInfo.Symbol.ToTestDisplayString()); 5661Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5664var lambdaSym = (IMethodSymbol)(semanticInfo.Symbol); 5696Assert.Equal("lambda expression", semanticInfo.Symbol.ToTestDisplayString()); 5697Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5700var lambdaSym = (IMethodSymbol)(semanticInfo.Symbol); 5732Assert.Null(semanticInfo.Symbol); 5765Assert.Null(semanticInfo.Symbol); 5799Assert.Equal("System.Boolean c", semanticInfo.Symbol.ToTestDisplayString()); 5800Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 5832Assert.Null(semanticInfo.Symbol); 5866Assert.Equal("System.Boolean c", semanticInfo.Symbol.ToTestDisplayString()); 5867Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 5900Assert.Null(semanticInfo.Symbol); 5935Assert.Equal("System.Boolean c", semanticInfo.Symbol.ToTestDisplayString()); 5936Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 5968Assert.Null(semanticInfo.Symbol); 6002Assert.Equal("System.Boolean c", semanticInfo.Symbol.ToTestDisplayString()); 6003Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 6035Assert.Null(semanticInfo.Symbol); 6063Assert.Null(semanticInfo.Symbol); 6095Assert.Null(semanticInfo.Symbol); 6121Assert.Equal("System.Object..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 6122Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 6148Assert.Equal("C..ctor(System.Int32 x)", semanticInfo.Symbol.ToTestDisplayString()); 6149Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 6181Assert.Equal("MyClass..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 6182Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 6231Assert.Equal("args", semanticInfo.Symbol.Name); 6252var symbol = semanticInfo.Symbol; 6333Assert.Equal("Outer.Inner a", semanticInfo.Symbol.ToTestDisplayString()); 6334Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 6342var param = (IParameterSymbol)semanticInfo.Symbol; 6369var symbol = semanticInfo.Symbol; 6400Assert.Null(semanticInfo.Symbol); 6440Assert.Equal("System.Int32 C.Goo(System.Int32 i)", semanticInfo.Symbol.ToTestDisplayString()); 6441Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 6470Assert.Equal("void S.E(this System.Object o)", semanticInfo.Symbol.ToTestDisplayString()); 6493Assert.Equal("void System.Object.E()", semanticInfo.Symbol.ToTestDisplayString()); 6523Assert.Equal("System.String", semanticInfo.Symbol.ToTestDisplayString()); 6524Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 6558Assert.Equal("System.String", semanticInfo.Symbol.ToTestDisplayString()); 6559Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 6595Assert.Equal("N1.var", semanticInfo.Symbol.ToTestDisplayString()); 6596Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 6645Assert.Equal("C", semanticInfo.Symbol.ToTestDisplayString()); 6679Assert.Null(semanticInfo.Symbol); 6810Assert.Null(semanticInfo.Symbol); 6879Assert.Equal("System.String TestAttribute.F", semanticInfo.Symbol.ToTestDisplayString()); 6880Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 6924Assert.Equal("System.Double TestAttribute.P { get; set; }", semanticInfo.Symbol.ToTestDisplayString()); 6925Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 6969Assert.Null(semanticInfo.Symbol); 6999Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7028Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7051Assert.Equal("Struct", semanticInfo.Symbol.ToTestDisplayString()); 7052Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 7082Assert.Equal("Struct..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 7083Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7110Assert.Equal("MyAttribute..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 7111Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7141Assert.Equal("N1.MyAttribute..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 7142Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7173Assert.Null(semanticInfo.Symbol); 7205Assert.Null(semanticInfo.Symbol); 7237Assert.Null(semanticInfo.Symbol); 7266Assert.Equal("System.Func<System.Int32, System.Int32>", semanticInfo.Symbol.ToTestDisplayString()); 7292Assert.Equal("System.Object..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 7293Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7294Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)semanticInfo.Symbol).MethodKind); 7320Assert.Equal("C..ctor(System.Int32 x)", semanticInfo.Symbol.ToTestDisplayString()); 7321Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7347Assert.Null(semanticInfo.Symbol); 7403Assert.Null(semanticInfo.Symbol); 7429Assert.Null(semanticInfo.Symbol); 7457Assert.Null(semanticInfo.Symbol); 7490Assert.Null(semanticInfo.Symbol); 7526Assert.NotNull(semanticInfo.Symbol); 7556Assert.Equal("System.Int32 z", semanticInfo.Symbol.ToTestDisplayString()); 7557Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 7589Assert.Null(semanticInfo.Symbol); 7627Assert.Null(semanticInfo.Symbol); 7664Assert.Equal("System.Int32 x", semanticInfo.Symbol.ToTestDisplayString()); 7665Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 7703Assert.Equal("System.String str1", semanticInfo.Symbol.ToTestDisplayString()); 7704Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 7732Assert.Equal("S s", semanticInfo.Symbol.ToTestDisplayString()); 7733Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 7757Assert.NotNull(semanticInfo.Symbol); 7758Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7822Assert.Equal("C.MyDelegate", semanticInfo.Symbol.ToTestDisplayString()); 7823Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 7855Assert.Null(semanticInfo.Symbol); 7887Assert.Equal("C.MyDelegate", semanticInfo.Symbol.ToTestDisplayString()); 7888Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 7921Assert.Null(semanticInfo.Symbol); 7953Assert.Equal("System.Action", semanticInfo.Symbol.ToTestDisplayString()); 7987Assert.Null(semanticInfo.Symbol); 8023Assert.Equal("System.Int32 Program.f()", semanticInfo.Symbol.ToTestDisplayString()); 8039Assert.Null(semanticInfo.Symbol); 8076Assert.Equal("System.Int32 Program.f()", semanticInfo.Symbol.ToTestDisplayString()); 8092Assert.Null(semanticInfo.Symbol); 8332Assert.Equal("x", semanticInfo.Symbol.Name); 8373Assert.Null(semanticInfo.Symbol); 8407Assert.Null(semanticInfo.Symbol); 8437Assert.Null(semanticInfo.Symbol); 8461Assert.Null(semanticInfo.Symbol); 8518Assert.Null(semanticInfo.Symbol); 8564Assert.Equal("System.String s", semanticInfo.Symbol.ToTestDisplayString()); 8565Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 8609Assert.Equal("System.String s", semanticInfo.Symbol.ToTestDisplayString()); 8610Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 8648Assert.Equal("lambda expression", semanticInfo.Symbol.ToTestDisplayString()); 8649Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 8688Assert.Null(semanticInfo.Symbol); 8730Assert.Null(semanticInfo.Symbol); 8772Assert.Null(semanticInfo.Symbol); 8813Assert.Null(semanticInfo.Symbol); 8855Assert.Equal("System.Boolean x", semanticInfo.Symbol.ToTestDisplayString()); 8856Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 8897Assert.Equal("System.Boolean x", semanticInfo.Symbol.ToTestDisplayString()); 8898Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 8937Assert.Null(semanticInfo.Symbol); 9066Assert.Null(semanticInfo.Symbol); 9127Assert.Null(semanticInfo.Symbol); 9310Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 9311Assert.Equal("System.String", semanticInfo.Symbol.ToTestDisplayString()); 9362Assert.Null(semanticInfo.Symbol); 9421Assert.Null(semanticInfo.Symbol); 9452Assert.Null(semanticInfo.Symbol); 9532Assert.Null(semanticInfo.Symbol); 9568Assert.Null(semanticInfo.Symbol); 9618Assert.Null(semanticInfo.Symbol); 9673Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.Description.Description(string)", semanticInfo.Symbol.ToDisplayString()); 9724Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.DescriptionAttribute.DescriptionAttribute(string)", semanticInfo.Symbol.ToDisplayString()); 9784Assert.Null(semanticInfo.Symbol); 9835Assert.Null(semanticInfo.Symbol); 9890Assert.Null(semanticInfo.Symbol); 9921Assert.Equal("A1..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 9922Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 9955Assert.Equal("System.ObsoleteAttribute..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 9956Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 9991Assert.Equal("System.ObsoleteAttribute..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 9992Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 10027Assert.Equal("System.ObsoleteAttribute..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 10028Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 10063Assert.Equal("System.ObsoleteAttribute..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 10064Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 10107Assert.Equal("AttributeClass", semanticInfo.Symbol.ToTestDisplayString()); 10108Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 10115Assert.False(SyntaxFacts.IsAttributeName(((SourceNamedTypeSymbol)((CSharp.Symbols.PublicModel.NamedTypeSymbol)semanticInfo.Symbol).UnderlyingNamedTypeSymbol).SyntaxReferences.First().GetSyntax()), 10144Assert.Equal("AttributeClass", semanticInfo.Symbol.ToTestDisplayString()); 10145Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 10152Assert.False(SyntaxFacts.IsAttributeName(((SourceNamedTypeSymbol)((CSharp.Symbols.PublicModel.NamedTypeSymbol)semanticInfo.Symbol).UnderlyingNamedTypeSymbol).SyntaxReferences.First().GetSyntax()), 10181Assert.Null(semanticInfo.Symbol); 10220Assert.Null(semanticInfo.Symbol); 10251Assert.Null(semanticInfo.Symbol); 10286Assert.Null(semanticInfo.Symbol); 10321Assert.Null(semanticInfo.Symbol); 10355Assert.Null(semanticInfo.Symbol); 10389Assert.Null(semanticInfo.Symbol); 10431Assert.Null(semanticInfo.Symbol); 10470Assert.Null(semanticInfo.Symbol); 10497Assert.Null(semanticInfo.Symbol); 10526Assert.Null(semanticInfo.Symbol); 10562Assert.Null(semanticInfo.Symbol); 10604Assert.Null(semanticInfo.Symbol); 10641Assert.Null(semanticInfo.Symbol); 10678Assert.Null(semanticInfo.Symbol); 10717Assert.Null(semanticInfo.Symbol); 10760Assert.Null(semanticInfo.Symbol); 10802Assert.Null(semanticInfo.Symbol); 10839Assert.Null(semanticInfo.Symbol); 10908Assert.Null(semanticInfo.Symbol); 10938Assert.NotNull(semanticInfo.Symbol); 10939Assert.Equal("Program..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 10958Assert.NotNull(semanticInfo.Symbol); 11148Assert.Null(semanticInfo.Symbol); 11192Assert.Equal("Goo", semanticInfo.Symbol.ToTestDisplayString()); 11226Assert.Null(semanticInfo.Symbol); 11270Assert.Equal("System.Int16 Constants.k", semanticInfo.Symbol.ToTestDisplayString()); 11271Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 11307Assert.Equal("System.Int32 Class1.i", semanticInfo.Symbol.ToTestDisplayString()); 11308Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 11344Assert.Equal("System.Int32 Class1.i", semanticInfo.Symbol.ToTestDisplayString()); 11345Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 11384Assert.Equal("System.Int32 Class1.i", semanticInfo.Symbol.ToTestDisplayString()); 11385Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 11431Assert.Equal("System.Int32", semanticInfo.Symbol.ToTestDisplayString()); 11432Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 11464Assert.Equal("System.Boolean System.Boolean.op_Equality(System.Boolean left, System.Boolean right)", semanticInfo.Symbol.ToTestDisplayString()); 11501Assert.Null(semanticInfo.Symbol); 11539Assert.Null(semanticInfo.Symbol); 11576Assert.Null(semanticInfo.Symbol); 11611Assert.Equal("System.Runtime.CompilerServices.IndexerNameAttribute..ctor(System.String indexerName)", semanticInfo.Symbol.ToTestDisplayString()); 11642Assert.Equal("<global namespace>", semanticInfo.Symbol.ToTestDisplayString()); 11643Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 11644Assert.True(((INamespaceSymbol)semanticInfo.Symbol).IsGlobalNamespace); 11676Assert.Equal("<global namespace>", semanticInfo.Symbol.ToTestDisplayString()); 11677Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 11678Assert.True(((INamespaceSymbol)semanticInfo.Symbol).IsGlobalNamespace); 11714Assert.Equal("System.Int32 Program.y", semanticInfo.Symbol.ToTestDisplayString()); 11715Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 11759Assert.Equal("NS1", semanticInfo.Symbol.ToTestDisplayString()); 11760Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 11799Assert.Null(semanticInfo.Symbol); 11835Assert.Equal("System.Int32[] a", semanticInfo.Symbol.ToTestDisplayString()); 11836Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 11870Assert.Null(semanticInfo.Symbol); 11905Assert.Equal("System.Int32[][,,] a3", semanticInfo.Symbol.ToTestDisplayString()); 11906Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 11941Assert.Null(semanticInfo.Symbol); 11977Assert.Equal("?[] array1", semanticInfo.Symbol.ToTestDisplayString()); 11978Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 12012Assert.Null(semanticInfo.Symbol); 12047Assert.Null(semanticInfo.Symbol); 12083Assert.Null(semanticInfo.Symbol); 12156Assert.Null(semanticInfo.Symbol); 12190Assert.Null(semanticInfo.Symbol); 12223Assert.Null(semanticInfo.Symbol); 12260Assert.Null(semanticInfo.Symbol); 12291Assert.Null(semanticInfo.Symbol); 12326Assert.Null(semanticInfo.Symbol); 12359Assert.Null(semanticInfo.Symbol); 12395Assert.Null(semanticInfo.Symbol); 12430Assert.Null(semanticInfo.Symbol); 12457Assert.Equal("dynamic", semanticInfo.Symbol.ToTestDisplayString()); 12488Assert.Null(semanticInfo.Symbol); 12531Assert.Equal("Conv C", semanticInfo.Symbol.ToTestDisplayString()); 12532Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 12572Assert.Equal("Conv? C", semanticInfo.Symbol.ToTestDisplayString()); 12573Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 12614Assert.Equal("Conv C", semanticInfo.Symbol.ToTestDisplayString()); 12615Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 12648Assert.Equal("Conv C", semanticInfo.Symbol.ToTestDisplayString()); 12649Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 12680Assert.Equal("MemberInitializerTest..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 12681Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 12711Assert.Null(semanticInfo.Symbol); 12743Assert.Null(semanticInfo.Symbol); 12775Assert.Equal("System.Int32 MemberInitializerTest.x", semanticInfo.Symbol.ToTestDisplayString()); 12776Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 12807Assert.Equal("System.Int32 MemberInitializerTest.y { get; set; }", semanticInfo.Symbol.ToTestDisplayString()); 12808Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 12850Assert.Equal("System.Int32 Base.x", semanticInfo.Symbol.ToTestDisplayString()); 12851Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 12887Assert.Null(semanticInfo.Symbol); 12926Assert.Equal("System.Int32 MemberInitializerTest.y { get; set; }", semanticInfo.Symbol.ToTestDisplayString()); 12927Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 12962Assert.Null(semanticInfo.Symbol); 13000Assert.Null(semanticInfo.Symbol); 13041Assert.Null(semanticInfo.Symbol); 13072Assert.Null(semanticInfo.Symbol); 13102Assert.Equal("System.Int32 MemberInitializerTest.y", semanticInfo.Symbol.ToTestDisplayString()); 13103Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 13133Assert.Null(semanticInfo.Symbol); 13167Assert.Null(semanticInfo.Symbol); 13201Assert.Null(semanticInfo.Symbol); 13232Assert.Null(semanticInfo.Symbol); 13267Assert.Equal("System.Int32 MemberInitializerTest.x", semanticInfo.Symbol.ToTestDisplayString()); 13268Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 13327Assert.Equal("B..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 13328Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 13386Assert.Null(semanticInfo.Symbol); 13446Assert.Null(semanticInfo.Symbol); 13507Assert.Equal("System.Int32 i", semanticInfo.Symbol.ToTestDisplayString()); 13508Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 13565Assert.Null(semanticInfo.Symbol); 13595Assert.Null(semanticInfo.Symbol); 13660Assert.Null(semanticInfo.Symbol); 13689Assert.Null(semanticInfo.Symbol); 13745Assert.Null(semanticInfo.Symbol); 13778Assert.Null(semanticInfo.Symbol); 13809Assert.Null(semanticInfo.Symbol); 13843Assert.Null(semanticInfo.Symbol); 13877Assert.Null(semanticInfo.Symbol); 13916Assert.Null(semanticInfo.Symbol); 13955Assert.Equal("System.Random", semanticInfo.Symbol.ToTestDisplayString()); 13956Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 13982Assert.Null(semanticInfo.Symbol); 14009Assert.Null(semanticInfo.Symbol); 14046Assert.Equal("InterfaceType", semanticInfo.Symbol.ToTestDisplayString()); 14047Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 14085Assert.Equal("InterfaceType", semanticInfo.Symbol.ToTestDisplayString()); 14086Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 14123Assert.Equal("CoClassType..ctor()", semanticInfo.Symbol.ToTestDisplayString()); 14124Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 14163Assert.Null(semanticInfo.Symbol); 14205Assert.Equal("NonGenericInterfaceType", semanticInfo.Symbol.ToTestDisplayString()); 14206Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 14249Assert.Equal("GenericCoClassType<System.Int32, System.String>..ctor(System.String x)", semanticInfo.Symbol.ToTestDisplayString()); 14250Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 14295Assert.Equal("Wrapper.InterfaceType", semanticInfo.Symbol.ToTestDisplayString()); 14341Assert.Null(semanticInfo.Symbol); 14384Assert.Null(semanticInfo.Symbol); 14422Assert.Null(semanticInfo.Symbol); 14448Assert.Null(semanticInfo.Symbol); 14463Assert.Null(semanticInfo.Symbol); 14511Assert.Null(semanticInfo.Symbol); 14545Assert.Null(semanticInfo.Symbol); 14630Assert.Equal("void C.Goo(System.Int32 x)", semanticInfo.Symbol.ToTestDisplayString()); 14631Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 14669Assert.Equal("void C.Goo()", semanticInfo.Symbol.ToTestDisplayString()); 14670Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 15088Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15089Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 15117Assert.Null(semanticInfo.Symbol); 15156Assert.Equal("string.ToString()", semanticInfo.Symbol.ToDisplayString()); 15157Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 15187Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15188Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 15218Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15219Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 15249Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15250Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 15280Assert.Equal("string.this[int]", semanticInfo.Symbol.ToDisplayString()); 15281Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 15307Assert.Equal("BaselineLog", semanticInfo.Symbol.ToDisplayString()); 15308Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 15342Assert.Null(semanticInfo.Symbol); 15409Assert.Equal("K", semanticInfo.Symbol.ToTestDisplayString()); 15410Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind);
Compilation\SemanticModelGetSemanticInfoTests_LateBound.cs (27)
41Assert.Null(semanticInfo.Symbol); 65Assert.Equal("C..ctor(out dynamic x, ref dynamic y)", semanticInfo.Symbol.ToTestDisplayString()); 86Assert.Equal("C..ctor(out dynamic x, dynamic y)", semanticInfo.Symbol.ToTestDisplayString()); 112Assert.Null(semanticInfo.Symbol); 144Assert.Null(semanticInfo.Symbol); 170Assert.Null(semanticInfo.Symbol); 205Assert.Null(semanticInfo.Symbol); 229Assert.Equal("C C.Create(System.Int32 arg)", semanticInfo.Symbol.ToTestDisplayString()); 269Assert.Null(semanticInfo.Symbol); 292Assert.Equal("void System.Collections.Generic.List<System.Int32>.Add(System.Int32 item)", semanticInfo.Symbol.ToTestDisplayString()); 320Assert.Null(semanticInfo.Symbol); 349Assert.Null(semanticInfo.Symbol); 383Assert.Equal("System.Int32 C.bar(ref dynamic a)", semanticInfo.Symbol.ToTestDisplayString()); 428Assert.Null(semanticInfo.Symbol); 522Assert.Null(semanticInfo.Symbol); 557Assert.Equal("System.Int32 C.this[System.Int32 a] { get; set; }", semanticInfo.Symbol.ToTestDisplayString()); 590Assert.Null(semanticInfo.Symbol); 618Assert.Null(semanticInfo.Symbol); 655Assert.Equal("dynamic dynamic." + operatorNames[i] + "(dynamic value)", semanticInfo.Symbol.ToTestDisplayString()); 682Assert.Null(semanticInfo.Symbol); 712Assert.Null(semanticInfo.Symbol); 716Assert.Equal("dynamic.operator " + op + "(dynamic, dynamic)", semanticInfo.Symbol.ToString()); 745Assert.Null(semanticInfo.Symbol); 774Assert.Null(semanticInfo.Symbol); 801Assert.Null(semanticInfo.Symbol); 829Assert.Equal("dynamic.operator " + op.Substring(0, op.Length - 1) + "(dynamic, dynamic)", semanticInfo.Symbol.ToString()); 860Assert.Equal(op == "+=" ? "void C.E.add" : "void C.E.remove", semanticInfo.Symbol.ToTestDisplayString());
Symbols\AnonymousTypesSemanticsTests.cs (9)
322info1.Symbol.ToTestDisplayString()); 426Assert.Equal("<anonymous type: D1 module>..ctor(D1 module)", info0.Symbol.ToTestDisplayString()); 491Assert.Equal("System.Int32 System.Func<System.Int32, System.Int32>.Invoke(System.Int32 arg)", info1.Symbol.ToTestDisplayString()); 589var method = info.Symbol; 657var method = info.Symbol; 678var method = info.Symbol; 699var method = info.Symbol; 922Assert.Equal("<anonymous type: System.Int32 x, <empty anonymous type> y>..ctor(System.Int32 x, <empty anonymous type> y)", info0.Symbol.ToTestDisplayString()); 987Assert.Equal("<anonymous type: System.Int32 x, <empty anonymous type> y>..ctor(System.Int32 x, <empty anonymous type> y)", info0.Symbol.ToTestDisplayString());
Symbols\Source\LocalTests.cs (5)
35var symbol = (ILocalSymbol)semanticInfo.Symbol; 89var symbol = (ILocalSymbol)semanticInfo.Symbol; 114var symbol = (ILocalSymbol)semanticInfo.Symbol; 139var symbol = (ILocalSymbol)semanticInfo.Symbol; 162var symbol = (ILocalSymbol)semanticInfo.Symbol;
Symbols\Source\UsingAliasTests.cs (24)
49Assert.NotNull(info1.Symbol); 55Assert.Equal(info1.Symbol, alias1.Target); 58Assert.NotNull(info2.Symbol); 59var b2 = info2.Symbol; 64Assert.NotNull(info3.Symbol); 65var b3 = info3.Symbol; 70Assert.Null(info4.Symbol); // no "using System;" 109Assert.NotNull(info1.Symbol); 115Assert.Equal(info1.Symbol, alias1.Target); 118Assert.NotNull(info2.Symbol); 119var b2 = info2.Symbol; 124Assert.NotNull(info3.Symbol); 125var b3 = info3.Symbol; 130Assert.Null(info4.Symbol); // no "using System;" 173Assert.NotNull(info2.Symbol); 174var b2 = info2.Symbol; 179Assert.NotNull(info3.Symbol); 180var b3 = info3.Symbol; 185Assert.Null(info4.Symbol); // no "using System;" 231Assert.NotNull(info2.Symbol); 232var b2 = info2.Symbol; 237Assert.NotNull(info3.Symbol); 238var b3 = info3.Symbol; 243Assert.Null(info4.Symbol); // no "using System;"
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
FunctionPointerUtilities.cs (3)
219AssertEx.Equal(expectedSymbol, semanticInfo.Symbol.ToTestDisplayString(includeNonNullable: false)); 224Assert.Null(semanticInfo.Symbol); 230Assert.Null(semanticInfo.Symbol);