2 writes to Symbol
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CompilationTestUtils.cs (2)
287
summary.
Symbol
= symbolInfo.Symbol;
329
summary.
Symbol
= symbolInfo.Symbol;
804 references to Symbol
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (143)
Semantics\ExpressionBodiedMemberTests.cs (16)
79
var semanticSymbol = semanticInfo.
Symbol
;
105
Assert.Null(semanticInfo.
Symbol
);
124
var sym = Assert.IsType<SourcePropertySymbol>(info.
Symbol
.GetSymbol());
140
Assert.Equal("i", semanticInfo.
Symbol
.Name);
141
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
158
Assert.Equal("c", semanticInfo.
Symbol
.Name);
159
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
173
Assert.Equal("s", semanticInfo.
Symbol
.Name);
174
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
208
var sym = semanticInfo.
Symbol
;
230
var semanticSymbol = semanticInfo.
Symbol
;
261
Assert.Equal("t", semanticInfo.
Symbol
.Name);
262
var m = semanticInfo.
Symbol
.ContainingSymbol.GetSymbol<SourceOrdinaryMethodSymbol>();
267
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
286
var semanticSymbol = semanticInfo.
Symbol
;
319
var semanticSymbol = semanticInfo.
Symbol
;
Semantics\FunctionPointerTests.cs (1)
3968
Assert.Equal("delegate*<?, System.Void>", semanticInfo.
Symbol
.ToTestDisplayString(includeNonNullable: false));
Semantics\InteractiveSemanticModelTests.cs (11)
127
var symbol = bindInfo.
Symbol
;
142
var symbol = bindInfo.
Symbol
;
163
Assert.Equal("System.Random", semanticInfo.
Symbol
.ToTestDisplayString());
164
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
188
Assert.Null(semanticInfo.
Symbol
);
214
Assert.Equal("Script.var", semanticInfo.
Symbol
.ToTestDisplayString());
215
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
242
Assert.Null(semanticInfo.
Symbol
);
266
Assert.Equal("c", semanticInfo.
Symbol
.Name);
267
Assert.Equal(SymbolKind.RangeVariable, semanticInfo.
Symbol
.Kind);
351
var method = bindInfo.
Symbol
.ToDisplayString();
Semantics\InterpolationTests.cs (1)
4618
AssertEx.Equal("System.String System.String.op_Addition(System.String left, System.String right)", semanticInfo.
Symbol
.ToTestDisplayString());
Semantics\QueryTests.cs (27)
1486
Assert.Equal(x, model.GetSemanticInfoSummary(xPy.Left).
Symbol
);
1487
Assert.Equal(y, model.GetSemanticInfoSummary(xPy.Right).
Symbol
);
1488
Assert.Equal(z, model.GetSemanticInfoSummary(xPyPz.Right).
Symbol
);
1695
Assert.Equal(x, model.GetSemanticInfoSummary(xPy.Left).
Symbol
);
1696
Assert.Equal(y, model.GetSemanticInfoSummary(xPy.Right).
Symbol
);
1697
Assert.Equal(z, model.GetSemanticInfoSummary(xPyPz.Right).
Symbol
);
1777
Assert.Equal("OrderByDescending", oinfo0.
Symbol
.Name);
1780
Assert.Equal("ThenBy", oinfo1.
Symbol
.Name);
2180
Assert.Equal(SymbolKind.RangeVariable, info.
Symbol
.Kind);
2182
var m = (IMethodSymbol)info2.
Symbol
;
2210
Assert.Equal(SymbolKind.RangeVariable, info.
Symbol
.Kind);
2237
Assert.Equal(SymbolKind.RangeVariable, info.
Symbol
.Kind);
2238
Assert.Equal("x", info.
Symbol
.Name);
2243
Assert.Equal(SymbolKind.RangeVariable, info.
Symbol
.Kind);
2244
Assert.Equal("w", info.
Symbol
.Name);
2249
Assert.Equal("System.Int32 System.Int32.op_Addition(System.Int32 left, System.Int32 right)", info2.
Symbol
.ToTestDisplayString());
2398
Assert.Null(symbolInfoForSelect.
Symbol
);
2432
Assert.Equal(names[count++], symbolInfo.
Symbol
.Name);
2487
Assert.Null(symbolInfoForSelect.
Symbol
);
2551
Assert.Null(symbolInfoForSelect.
Symbol
);
2586
Assert.Null(symbolInfoForOrdering.
Symbol
);
2719
Assert.Null(symbolInfo.
Symbol
);
2745
Assert.Null(symbolInfo.
Symbol
);
2907
Assert.Equal("Select", infoSelect.
Symbol
.Name);
2940
Assert.Equal("Select", infoSelect.
Symbol
.Name);
3477
Assert.Equal(x, speculativeModel.GetSemanticInfoSummary(selectExpression).
Symbol
);
3610
Assert.Equal(names[count++], symbolInfo.
Symbol
.Name);
Semantics\RawInterpolationTests_Handler.cs (1)
2919
AssertEx.Equal("System.String System.String.op_Addition(System.String left, System.String right)", semanticInfo.
Symbol
.ToTestDisplayString());
Semantics\ScriptSemanticsTests.cs (2)
248
Assert.Null(summary.
Symbol
);
565
Assert.Null(summary.
Symbol
);
Semantics\StackAllocInitializerTests.cs (47)
373
Assert.Null(stackallocInfo.
Symbol
);
379
Assert.Null(element0Info.
Symbol
);
387
Assert.Null(stackallocInfo.
Symbol
);
393
Assert.Equal("<empty anonymous type>..ctor()", element0Info.
Symbol
.ToTestDisplayString());
401
Assert.Null(stackallocInfo.
Symbol
);
407
Assert.Equal("Test.S s", element0Info.
Symbol
.ToTestDisplayString());
449
Assert.Null(stackallocInfo.
Symbol
);
455
Assert.Null(element0Info.
Symbol
);
463
Assert.Null(stackallocInfo.
Symbol
);
469
Assert.Equal("<empty anonymous type>..ctor()", element0Info.
Symbol
.ToTestDisplayString());
477
Assert.Null(stackallocInfo.
Symbol
);
483
Assert.Equal("Test.S s", element0Info.
Symbol
.ToTestDisplayString());
2365
Assert.Null(stackallocInfo.
Symbol
);
2371
Assert.Null(element0Info.
Symbol
);
2377
Assert.Null(element1Info.
Symbol
);
2383
Assert.Null(sizeInfo.
Symbol
);
2393
Assert.Null(stackallocInfo.
Symbol
);
2399
Assert.Null(element0Info.
Symbol
);
2405
Assert.Null(element1Info.
Symbol
);
2411
Assert.Null(sizeInfo.
Symbol
);
2421
Assert.Null(stackallocInfo.
Symbol
);
2427
Assert.Null(element0Info.
Symbol
);
2433
Assert.Null(element1Info.
Symbol
);
2439
Assert.Null(sizeInfo.
Symbol
);
2471
Assert.Null(stackallocInfo.
Symbol
);
2477
Assert.Null(element0Info.
Symbol
);
2483
Assert.Null(element1Info.
Symbol
);
2493
Assert.Null(stackallocInfo.
Symbol
);
2499
Assert.Null(element0Info.
Symbol
);
2505
Assert.Null(element1Info.
Symbol
);
2515
Assert.Null(stackallocInfo.
Symbol
);
2521
Assert.Null(element0Info.
Symbol
);
2527
Assert.Null(element1Info.
Symbol
);
2571
Assert.Null(stackallocInfo.
Symbol
);
2577
Assert.Null(element0Info.
Symbol
);
2583
Assert.Null(element1Info.
Symbol
);
2589
Assert.Null(sizeInfo.
Symbol
);
2599
Assert.Null(stackallocInfo.
Symbol
);
2605
Assert.Equal("ref System.Int16 System.Span<System.Int16>.this[System.Int32 i] { get; }", element0Info.
Symbol
.ToTestDisplayString());
2611
Assert.Equal("System.Int32 System.Span<System.Int16>.Length { get; }", element1Info.
Symbol
.ToTestDisplayString());
2617
Assert.Equal("System.Int32 System.Span<System.Int16>.Length { get; }", sizeInfo.
Symbol
.ToTestDisplayString());
2655
Assert.Null(stackallocInfo.
Symbol
);
2661
Assert.Null(element0Info.
Symbol
);
2667
Assert.Null(element1Info.
Symbol
);
2677
Assert.Null(stackallocInfo.
Symbol
);
2683
Assert.Equal("ref System.Double System.Span<System.Double>.this[System.Int32 i] { get; }", element0Info.
Symbol
.ToTestDisplayString());
2689
Assert.Equal("System.Int32 System.Span<System.Double>.Length { get; }", element1Info.
Symbol
.ToTestDisplayString());
Semantics\UnsafeTests.cs (37)
7858
var receiverSymbol = receiverSummary.
Symbol
;
7870
Assert.Equal(structMethod1, methodGroupSummary.
Symbol
.GetSymbol());
7879
Assert.Equal(structMethod1, callSummary.
Symbol
.GetSymbol());
7925
var receiverSymbol = receiverSummary.
Symbol
;
7937
Assert.Equal(structMethod1, methodGroupSummary.
Symbol
.GetSymbol()); // Have enough info for overload resolution.
7944
Assert.Equal(structMethod1, callSummary.
Symbol
.GetSymbol()); // Have enough info for overload resolution.
8169
var receiverSymbol = receiverSummary.
Symbol
;
8181
var indexSymbol = indexSummary.
Symbol
;
8193
Assert.Null(accessSummary.
Symbol
);
8236
var receiverSymbol = receiverSummary.
Symbol
;
8248
var indexSymbol = indexSummary.
Symbol
;
8252
Assert.Null(accessSummary.
Symbol
);
8294
var receiverSymbol = receiverSummary.
Symbol
;
8306
var indexSymbol = indexSummary.
Symbol
;
8310
Assert.Null(accessSummary.
Symbol
);
8867
Assert.Null(summary.
Symbol
);
8871
Assert.NotNull(summary.
Symbol
);
8872
var summaryMethod = (IMethodSymbol)summary.
Symbol
;
8914
Assert.Equal("System.Int64 System.Byte*.op_Subtraction(System.Byte* left, System.Byte* right)", summary.
Symbol
.ToTestDisplayString());
9329
Assert.Null(summary.
Symbol
);
9333
Assert.NotNull(summary.
Symbol
);
9334
var summaryMethod = (IMethodSymbol)summary.
Symbol
;
10243
Assert.Null(summary0.
Symbol
);
10248
Assert.Equal(arraySymbol, summary1.
Symbol
.GetSymbol());
10252
Assert.Null(summary2.
Symbol
);
10310
Assert.Null(summary0.
Symbol
);
10317
Assert.Equal(arraySymbol, summary1.
Symbol
.GetSymbol());
10323
Assert.Null(summary2.
Symbol
);
10631
var type = typeSummary.
Symbol
as ITypeSymbol;
10646
Assert.Null(sizeOfSummary.
Symbol
);
10693
var type = typeSummary.
Symbol
as ITypeSymbol;
10708
Assert.Null(sizeOfSummary.
Symbol
);
10753
var type = typeSummary.
Symbol
as ITypeSymbol;
10768
Assert.Null(sizeOfSummary.
Symbol
);
11314
Assert.Null(stackAllocSummary.
Symbol
);
11326
Assert.Equal(typeSummary.
Symbol
, typeSummary.Type);
11338
var countSymbol = (ILocalSymbol)countSummary.
Symbol
;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (658)
Compilation\GetSemanticInfoTests.cs (25)
980
Assert.Equal("System.Boolean System.Int32.op_Equality(System.Int32 left, System.Int32 right)", info.
Symbol
.ToTestDisplayString());
1004
Assert.Equal("System.Boolean System.Int32.op_LessThan(System.Int32 left, System.Int32 right)", info.
Symbol
.ToTestDisplayString());
1026
IMethodSymbol methodSymbol = (IMethodSymbol)bindInfo.
Symbol
;
1169
var parameterSymbol = (IParameterSymbol)bindInfo.
Symbol
;
1198
var parameterSymbol = (IParameterSymbol)bindInfo.
Symbol
;
1222
Assert.Null(bindInfo.
Symbol
);
1245
Assert.Equal(systemActionType, bindInfo.
Symbol
);
1273
Assert.Equal(eventSymbol, bindInfo.
Symbol
);
1301
Assert.Equal(eventSymbol, bindInfo.
Symbol
);
1328
Assert.Equal(eventSymbol.AddMethod, bindInfo.
Symbol
);
1355
Assert.Equal(eventSymbol.AddMethod, bindInfo.
Symbol
);
1378
Assert.Null(bindInfo.
Symbol
);
1418
Assert.Equal(indexerSymbol, bindInfo.
Symbol
);
1459
Assert.Null(bindInfo.
Symbol
);
1493
Assert.Null(bindInfo.
Symbol
);
1529
Assert.Null(bindInfo.
Symbol
);
1560
var symbol = bindInfo.
Symbol
;
1582
var symbol = bindInfo.
Symbol
;
1610
var symbol = bindInfo.
Symbol
;
1706
var symbol = bindInfo.
Symbol
;
1741
var symbol = bindInfo.
Symbol
;
1776
var symbol = bindInfo.
Symbol
;
1812
var symbol = bindInfo.
Symbol
;
3556
Assert.Equal(SymbolKind.Namespace, info.
Symbol
.Kind);
4304
Assert.Null(info.
Symbol
);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (26)
2259
Assert.NotNull(info.
Symbol
);
2260
Assert.Equal("F", info.
Symbol
.Name);
2295
Assert.Null(info.
Symbol
);
2331
Assert.Null(info.
Symbol
);
2367
Assert.Null(info.
Symbol
);
2404
Assert.NotNull(info.
Symbol
);
2434
Assert.NotNull(info.
Symbol
);
2466
Assert.NotNull(info.
Symbol
);
2503
Assert.NotNull(info.
Symbol
);
2504
Assert.Equal("System", info.
Symbol
.Name);
2570
Assert.NotNull(info.
Symbol
);
2599
Assert.NotNull(info.
Symbol
);
2600
Assert.Equal("System", info.
Symbol
.Name);
2624
Assert.Null(info.
Symbol
);
2764
Assert.NotNull(info.
Symbol
);
2817
var n1 = info.
Symbol
;
3276
Assert.NotNull(initInfo.
Symbol
);
3277
Assert.Equal("C.N(int)", initInfo.
Symbol
.ToDisplayString());
3289
Assert.NotNull(argInfo.
Symbol
);
3290
Assert.Equal("C.N()", argInfo.
Symbol
.ToDisplayString());
3671
Assert.Equal(SymbolKind.Parameter, info.
Symbol
.Kind);
3672
var parameter = (IParameterSymbol)info.
Symbol
;
3712
var symbol = model.GetSemanticInfoSummary(gotoStatement.Expression).
Symbol
;
3849
Assert.Equal(SymbolKind.Method, symbolInfo.
Symbol
.Kind);
4092
Assert.Equal(fieldB, semanticInfoExpression.
Symbol
);
4097
Assert.Equal("System.Console", semanticInfoExpression.
Symbol
.ToTestDisplayString());
Compilation\SemanticModelGetSemanticInfoTests.cs (542)
51
Assert.Null(semanticInfo.
Symbol
);
90
Assert.Equal("K<System.Int32>", semanticInfo.
Symbol
.ToTestDisplayString());
91
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
121
Assert.Null(semanticInfo.
Symbol
);
155
Assert.Null(semanticInfo.
Symbol
);
196
Assert.Null(semanticInfo.
Symbol
);
237
Assert.Null(semanticInfo.
Symbol
);
277
Assert.Null(semanticInfo.
Symbol
);
314
Assert.Null(semanticInfo.
Symbol
);
343
var symbol = semanticInfo.
Symbol
;
374
Assert.Null(semanticInfo.
Symbol
);
407
Assert.Equal("Test.Base", semanticInfo.
Symbol
.ToTestDisplayString());
431
var symbol = semanticInfo.
Symbol
;
467
Assert.Null(semanticInfo.
Symbol
);
507
Assert.Null(semanticInfo.
Symbol
);
550
Assert.Null(semanticInfo.
Symbol
);
598
Assert.Null(semanticInfo.
Symbol
);
646
Assert.Null(semanticInfo.
Symbol
);
699
Assert.Null(semanticInfo.
Symbol
);
730
Assert.NotNull(semanticInfo.
Symbol
);
766
Assert.NotNull(semanticInfo.
Symbol
);
800
Assert.Null(semanticInfo.
Symbol
);
839
Assert.Null(semanticInfo.
Symbol
);
925
Utils.CheckSymbol(semanticInfo.
Symbol
,
975
Utils.CheckSymbol(semanticInfo.
Symbol
,
994
Assert.Null(semanticInfo.
Symbol
);
1014
Assert.Null(semanticInfo.
Symbol
);
1034
Assert.Null(semanticInfo.
Symbol
);
1058
Utils.CheckSymbol(semanticInfo.
Symbol
,
1079
Assert.Null(semanticInfo.
Symbol
);
1453
Utils.CheckSymbol(semanticInfo.
Symbol
, "string A.P[int x, string y]");
1471
Utils.CheckSymbol(semanticInfo.
Symbol
, "string A.P[int x, string y]");
1483
Utils.CheckSymbol(semanticInfo.
Symbol
, "object A.P[int x = 0]");
1498
Assert.Null(semanticInfo.
Symbol
);
1519
Assert.Null(semanticInfo.
Symbol
);
1592
Utils.CheckSymbol(semanticInfo.
Symbol
, "object B.P1[object index]");
1607
Utils.CheckSymbol(semanticInfo.
Symbol
, "object B.P2[string index]");
1622
Utils.CheckSymbol(semanticInfo.
Symbol
, "object A.P3[object index]");
1648
Assert.Equal("C this", semanticInfo.
Symbol
.ToTestDisplayString());
1649
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
1692
Assert.Equal("System", semanticInfo.
Symbol
.ToTestDisplayString());
1693
Assert.Equal(SymbolKind.Namespace, semanticInfo.
Symbol
.Kind);
1724
Assert.Equal("System.Int32 i", semanticInfo.
Symbol
.ToTestDisplayString());
1725
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
1753
Assert.Null(semanticInfo.
Symbol
);
1784
Assert.Equal("System.Int32 System.Int32.op_Increment(System.Int32 value)", semanticInfo.
Symbol
.ToTestDisplayString());
1813
Assert.Null(semanticInfo.
Symbol
);
1843
Assert.Null(semanticInfo.
Symbol
);
1873
Assert.Null(semanticInfo.
Symbol
);
1903
Assert.Equal("System.String System.String.op_Addition(System.String left, System.Object right)", semanticInfo.
Symbol
.ToTestDisplayString());
1932
Assert.Equal("System.String System.String.op_Addition(System.String left, System.Object right)", semanticInfo.
Symbol
.ToTestDisplayString());
1962
Assert.Null(semanticInfo.
Symbol
);
1992
Assert.Equal("System.UInt32 System.UInt32.op_Addition(System.UInt32 left, System.UInt32 right)", semanticInfo.
Symbol
.ToTestDisplayString());
2022
Assert.Equal("ulong.operator +(ulong, ulong)", semanticInfo.
Symbol
.ToString());
2054
Assert.Equal("System.Boolean System.Boolean.op_LogicalNot(System.Boolean value)", semanticInfo.
Symbol
.ToTestDisplayString());
2086
Assert.Null(semanticInfo.
Symbol
);
2123
Assert.Equal("System.Exception e", semanticInfo.
Symbol
.ToTestDisplayString());
2124
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
2156
Assert.Equal("void Program.Ref<System.Object>(System.Object array)", semanticInfo.
Symbol
.ToTestDisplayString());
2157
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
2196
Assert.Equal("N1.I1", semanticInfo.
Symbol
.ToTestDisplayString());
2197
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
2224
Assert.Null(semanticInfo.
Symbol
);
2268
Assert.Equal("A.Goo", semanticInfo.
Symbol
.ToTestDisplayString());
2269
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
2303
Assert.Equal("System.String System.Enum.ToString()", semanticInfo.
Symbol
.ToTestDisplayString());
2304
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
2353
Assert.Equal("System.Int32 N1.I1.Method()", semanticInfo.
Symbol
.ToTestDisplayString());
2354
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
2399
Assert.Equal("void NGoo.Goo.method()", semanticInfo.
Symbol
.ToTestDisplayString());
2400
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
2442
Assert.Equal("void BaseClass.MyMeth()", semanticInfo.
Symbol
.ToTestDisplayString());
2443
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
2497
Assert.Equal("System.Int32 B.goo(ref System.String x, System.Int64 y, System.Int64 z)", semanticInfo.
Symbol
.ToTestDisplayString());
2498
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
2549
Assert.Equal("System.Int32 B.goo(params System.Int32[] x)", semanticInfo.
Symbol
.ToTestDisplayString());
2550
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
2581
Assert.Null(semanticInfo.
Symbol
);
2617
Assert.Equal("A", semanticInfo.
Symbol
.ToTestDisplayString());
2618
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
2654
Assert.Equal("A..ctor(System.Int32 x)", semanticInfo.
Symbol
.ToTestDisplayString());
2655
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
2695
Assert.Null(semanticInfo.
Symbol
);
2736
Assert.Null(semanticInfo.
Symbol
);
2786
Assert.Null(semanticInfo.
Symbol
);
2832
Assert.Null(semanticInfo.
Symbol
);
2875
Assert.Equal("System.Int32 A.f(System.String z)", semanticInfo.
Symbol
.ToTestDisplayString());
2876
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
2911
Assert.Equal("System.Int32 A.f(System.String z)", semanticInfo.
Symbol
.ToTestDisplayString());
2912
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
2951
Assert.Null(semanticInfo.
Symbol
);
2987
Assert.Null(semanticInfo.
Symbol
);
3021
Assert.Null(semanticInfo.
Symbol
);
3077
Assert.Equal("System.String MySystem.IO.StreamReader.NullStreamReader.ReadLine()", semanticInfo.
Symbol
.ToTestDisplayString());
3078
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
3122
Assert.Equal("System.String ISomething.ToString()", semanticInfo.
Symbol
.ToTestDisplayString());
3123
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
3162
Assert.Equal("void MyClass.MyMeth()", semanticInfo.
Symbol
.ToTestDisplayString());
3163
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
3204
Assert.Equal("void D.M2(System.Int32 x)", semanticInfo.
Symbol
.ToTestDisplayString());
3205
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
3250
Assert.Equal("void C2.M1()", semanticInfo.
Symbol
.ToTestDisplayString());
3251
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
3289
Assert.Equal("void TestClass.Test()", semanticInfo.
Symbol
.ToTestDisplayString());
3290
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
3325
Assert.Equal("void IB.M()", semanticInfo.
Symbol
.ToTestDisplayString());
3326
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
3362
Assert.Equal("void IR.M()", semanticInfo.
Symbol
.ToTestDisplayString());
3363
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
3399
Assert.Equal("System.Int32 Test.Meth1()", semanticInfo.
Symbol
.ToTestDisplayString());
3400
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
3430
Assert.Null(semanticInfo.
Symbol
);
3462
Assert.Null(semanticInfo.
Symbol
);
3497
Assert.Equal("System.Void", semanticInfo.
Symbol
.ToTestDisplayString());
3498
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
3528
Assert.Null(semanticInfo.
Symbol
);
3560
Assert.Equal("System", semanticInfo.
Symbol
.ToTestDisplayString());
3561
Assert.Equal(SymbolKind.Namespace, semanticInfo.
Symbol
.Kind);
3594
Assert.Equal("N1.N2.A1", semanticInfo.
Symbol
.ToTestDisplayString());
3595
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
3632
Assert.Equal("H<A>", semanticInfo.
Symbol
.ToTestDisplayString());
3633
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
3676
Assert.Equal("H<H<A>, H<A>>", semanticInfo.
Symbol
.ToTestDisplayString());
3677
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
3710
Assert.Equal("N1.N2.A2.A1", semanticInfo.
Symbol
.ToTestDisplayString());
3711
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
3744
Assert.Equal("N1.NC1.A1", semanticInfo.
Symbol
.ToTestDisplayString());
3745
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
3778
Assert.Equal("A.B", semanticInfo.
Symbol
.ToTestDisplayString());
3779
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
3808
Assert.Equal("DateTime dt", semanticInfo.
Symbol
.ToTestDisplayString());
3809
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
3840
Assert.Null(semanticInfo.
Symbol
);
3869
Assert.Equal("C..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
3870
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
3904
Assert.Equal("T.T", semanticInfo.
Symbol
.ToTestDisplayString());
3905
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
3941
Assert.Null(semanticInfo.
Symbol
);
3977
Assert.Null(semanticInfo.
Symbol
);
4012
Assert.Equal("A<B.Y.Z>", semanticInfo.
Symbol
.ToTestDisplayString());
4013
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
4043
Assert.Equal("System.Int32 x", semanticInfo.
Symbol
.ToTestDisplayString());
4044
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
4074
Assert.Null(semanticInfo.
Symbol
);
4111
Assert.Equal("System", semanticInfo.
Symbol
.ToTestDisplayString());
4112
Assert.Equal(SymbolKind.Namespace, semanticInfo.
Symbol
.Kind);
4140
Assert.Equal("System.Int32 System.String.Length { get; }", semanticInfo.
Symbol
.ToTestDisplayString());
4141
Assert.Equal(SymbolKind.Property, semanticInfo.
Symbol
.Kind);
4164
Assert.Null(semanticInfo.
Symbol
);
4190
Assert.Null(semanticInfo.
Symbol
);
4218
Assert.Null(semanticInfo.
Symbol
);
4251
Assert.Equal("C<T1>..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
4285
Assert.Null(semanticInfo.
Symbol
);
4323
Assert.Equal("B..ctor(System.String a, System.String b)", semanticInfo.
Symbol
.ToTestDisplayString());
4324
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
4377
Assert.Null(semanticInfo.
Symbol
);
4408
Assert.NotNull(semanticInfo.
Symbol
);
4409
Assert.Equal("A", semanticInfo.
Symbol
.ToTestDisplayString());
4410
Assert.Equal(SymbolKind.Namespace, semanticInfo.
Symbol
.Kind);
4448
Assert.NotNull(semanticInfo.
Symbol
);
4479
Assert.Equal("System.Object value", semanticInfo.
Symbol
.ToTestDisplayString());
4480
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
4504
Assert.Equal("System.String value", semanticInfo.
Symbol
.ToTestDisplayString());
4522
Assert.Equal("System.Int16 i", semanticInfo.
Symbol
.ToTestDisplayString());
4546
var symbol = semanticInfo.
Symbol
;
4574
Assert.Equal("System.Int32 j", semanticInfo.
Symbol
.ToTestDisplayString());
4575
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
4583
var symbol = (ILocalSymbol)semanticInfo.
Symbol
;
4612
Assert.Equal("System.Int32 C.j", semanticInfo.
Symbol
.ToTestDisplayString());
4613
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
4621
var symbol = (IFieldSymbol)semanticInfo.
Symbol
;
4648
Assert.Equal("System.Int32 System.Int32.op_Addition(System.Int32 left, System.Int32 right)", semanticInfo.
Symbol
.ToTestDisplayString());
4678
Assert.Equal("E.C", semanticInfo.
Symbol
.ToTestDisplayString());
4679
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
4687
var symbol = (IFieldSymbol)semanticInfo.
Symbol
;
4716
Assert.Equal("E.Y", semanticInfo.
Symbol
.ToTestDisplayString());
4717
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
4724
var symbol = (IFieldSymbol)semanticInfo.
Symbol
;
4752
Assert.Equal("E.B", semanticInfo.
Symbol
.ToTestDisplayString());
4753
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
4760
var symbol = (IFieldSymbol)semanticInfo.
Symbol
;
4788
Assert.Equal("E.D", semanticInfo.
Symbol
.ToTestDisplayString());
4789
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
4796
var symbol = (IFieldSymbol)semanticInfo.
Symbol
;
4819
Assert.Equal("E.B", semanticInfo.
Symbol
.ToTestDisplayString());
4820
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
4828
var symbol = (IFieldSymbol)semanticInfo.
Symbol
;
4856
Assert.Equal("System.String format", semanticInfo.
Symbol
.ToTestDisplayString());
4857
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
4883
Assert.Equal("System.Int32 x", semanticInfo.
Symbol
.ToTestDisplayString());
4884
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
4886
Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)semanticInfo.
Symbol
.ContainingSymbol).MethodKind);
4892
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.ContainingSymbol.Kind);
4893
Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)semanticInfo.
Symbol
.ContainingSymbol).MethodKind);
4922
Assert.Null(semanticInfo.
Symbol
);
4969
Assert.Null(semanticInfo.
Symbol
);
5021
Assert.Null(semanticInfo.
Symbol
);
5072
Assert.Equal("Class1", semanticInfo.
Symbol
.ToTestDisplayString());
5111
Assert.Null(semanticInfo.
Symbol
);
5158
Assert.Null(semanticInfo.
Symbol
);
5204
Assert.Equal("Class1..ctor(System.Int32 a, System.Int64 b)", semanticInfo.
Symbol
.ToTestDisplayString());
5205
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
5244
Assert.Equal("Class1", semanticInfo.
Symbol
.ToTestDisplayString());
5245
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
5283
Assert.Equal("Class1..ctor(System.Int32 a, System.Int64 b)", semanticInfo.
Symbol
.ToTestDisplayString());
5284
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
5325
Assert.Equal("Class1..ctor(System.Int32 a, System.Int64 b)", semanticInfo.
Symbol
.ToTestDisplayString());
5326
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
5407
Assert.Null(semanticInfo.
Symbol
);
5449
Assert.Null(semanticInfo.
Symbol
);
5485
Assert.Equal("System.Boolean System.Int32.op_Equality(System.Int32 left, System.Int32 right)", semanticInfo.
Symbol
.ToTestDisplayString());
5514
Assert.Equal("System.Boolean System.Int32.op_LessThan(System.Int32 left, System.Int32 right)", semanticInfo.
Symbol
.ToTestDisplayString());
5547
Assert.Equal("System.Int32 x", semanticInfo.
Symbol
.ToTestDisplayString());
5548
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
5554
Assert.True(semanticInfo.
Symbol
.GetSymbol().IsFromCompilation(compilation));
5579
Assert.Equal("System.Int32 C.x", semanticInfo.
Symbol
.ToTestDisplayString());
5580
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
5611
Assert.Equal("System.Int32 C.x", semanticInfo.
Symbol
.ToTestDisplayString());
5612
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
5637
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
5661
Assert.Equal("lambda expression", semanticInfo.
Symbol
.ToTestDisplayString());
5662
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
5665
var lambdaSym = (IMethodSymbol)(semanticInfo.
Symbol
);
5697
Assert.Equal("lambda expression", semanticInfo.
Symbol
.ToTestDisplayString());
5698
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
5701
var lambdaSym = (IMethodSymbol)(semanticInfo.
Symbol
);
5733
Assert.Null(semanticInfo.
Symbol
);
5766
Assert.Null(semanticInfo.
Symbol
);
5800
Assert.Equal("System.Boolean c", semanticInfo.
Symbol
.ToTestDisplayString());
5801
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
5833
Assert.Null(semanticInfo.
Symbol
);
5867
Assert.Equal("System.Boolean c", semanticInfo.
Symbol
.ToTestDisplayString());
5868
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
5901
Assert.Null(semanticInfo.
Symbol
);
5936
Assert.Equal("System.Boolean c", semanticInfo.
Symbol
.ToTestDisplayString());
5937
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
5969
Assert.Null(semanticInfo.
Symbol
);
6003
Assert.Equal("System.Boolean c", semanticInfo.
Symbol
.ToTestDisplayString());
6004
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
6036
Assert.Null(semanticInfo.
Symbol
);
6064
Assert.Null(semanticInfo.
Symbol
);
6096
Assert.Null(semanticInfo.
Symbol
);
6122
Assert.Equal("System.Object..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
6123
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
6149
Assert.Equal("C..ctor(System.Int32 x)", semanticInfo.
Symbol
.ToTestDisplayString());
6150
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
6182
Assert.Equal("MyClass..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
6183
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
6232
Assert.Equal("args", semanticInfo.
Symbol
.Name);
6253
var symbol = semanticInfo.
Symbol
;
6334
Assert.Equal("Outer.Inner a", semanticInfo.
Symbol
.ToTestDisplayString());
6335
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
6343
var param = (IParameterSymbol)semanticInfo.
Symbol
;
6370
var symbol = semanticInfo.
Symbol
;
6401
Assert.Null(semanticInfo.
Symbol
);
6441
Assert.Equal("System.Int32 C.Goo(System.Int32 i)", semanticInfo.
Symbol
.ToTestDisplayString());
6442
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
6471
Assert.Equal("void S.E(this System.Object o)", semanticInfo.
Symbol
.ToTestDisplayString());
6494
Assert.Equal("void System.Object.E()", semanticInfo.
Symbol
.ToTestDisplayString());
6524
Assert.Equal("System.String", semanticInfo.
Symbol
.ToTestDisplayString());
6525
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
6559
Assert.Equal("System.String", semanticInfo.
Symbol
.ToTestDisplayString());
6560
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
6596
Assert.Equal("N1.var", semanticInfo.
Symbol
.ToTestDisplayString());
6597
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
6646
Assert.Equal("C", semanticInfo.
Symbol
.ToTestDisplayString());
6680
Assert.Null(semanticInfo.
Symbol
);
6811
Assert.Null(semanticInfo.
Symbol
);
6880
Assert.Equal("System.String TestAttribute.F", semanticInfo.
Symbol
.ToTestDisplayString());
6881
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
6925
Assert.Equal("System.Double TestAttribute.P { get; set; }", semanticInfo.
Symbol
.ToTestDisplayString());
6926
Assert.Equal(SymbolKind.Property, semanticInfo.
Symbol
.Kind);
6970
Assert.Null(semanticInfo.
Symbol
);
7000
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
7029
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
7052
Assert.Equal("Struct", semanticInfo.
Symbol
.ToTestDisplayString());
7053
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
7083
Assert.Equal("Struct..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
7084
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
7111
Assert.Equal("MyAttribute..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
7112
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
7142
Assert.Equal("N1.MyAttribute..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
7143
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
7174
Assert.Null(semanticInfo.
Symbol
);
7206
Assert.Null(semanticInfo.
Symbol
);
7238
Assert.Null(semanticInfo.
Symbol
);
7267
Assert.Equal("System.Func<System.Int32, System.Int32>", semanticInfo.
Symbol
.ToTestDisplayString());
7293
Assert.Equal("System.Object..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
7294
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
7295
Assert.Equal(MethodKind.Constructor, ((IMethodSymbol)semanticInfo.
Symbol
).MethodKind);
7321
Assert.Equal("C..ctor(System.Int32 x)", semanticInfo.
Symbol
.ToTestDisplayString());
7322
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
7348
Assert.Null(semanticInfo.
Symbol
);
7404
Assert.Null(semanticInfo.
Symbol
);
7430
Assert.Null(semanticInfo.
Symbol
);
7458
Assert.Null(semanticInfo.
Symbol
);
7491
Assert.Null(semanticInfo.
Symbol
);
7527
Assert.NotNull(semanticInfo.
Symbol
);
7557
Assert.Equal("System.Int32 z", semanticInfo.
Symbol
.ToTestDisplayString());
7558
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
7590
Assert.Null(semanticInfo.
Symbol
);
7628
Assert.Null(semanticInfo.
Symbol
);
7665
Assert.Equal("System.Int32 x", semanticInfo.
Symbol
.ToTestDisplayString());
7666
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
7704
Assert.Equal("System.String str1", semanticInfo.
Symbol
.ToTestDisplayString());
7705
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
7733
Assert.Equal("S s", semanticInfo.
Symbol
.ToTestDisplayString());
7734
Assert.Equal(SymbolKind.Parameter, semanticInfo.
Symbol
.Kind);
7758
Assert.NotNull(semanticInfo.
Symbol
);
7759
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
7823
Assert.Equal("C.MyDelegate", semanticInfo.
Symbol
.ToTestDisplayString());
7824
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
7856
Assert.Null(semanticInfo.
Symbol
);
7888
Assert.Equal("C.MyDelegate", semanticInfo.
Symbol
.ToTestDisplayString());
7889
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
7922
Assert.Null(semanticInfo.
Symbol
);
7954
Assert.Equal("System.Action", semanticInfo.
Symbol
.ToTestDisplayString());
7988
Assert.Null(semanticInfo.
Symbol
);
8024
Assert.Equal("System.Int32 Program.f()", semanticInfo.
Symbol
.ToTestDisplayString());
8040
Assert.Null(semanticInfo.
Symbol
);
8077
Assert.Equal("System.Int32 Program.f()", semanticInfo.
Symbol
.ToTestDisplayString());
8093
Assert.Null(semanticInfo.
Symbol
);
8333
Assert.Equal("x", semanticInfo.
Symbol
.Name);
8374
Assert.Null(semanticInfo.
Symbol
);
8408
Assert.Null(semanticInfo.
Symbol
);
8438
Assert.Null(semanticInfo.
Symbol
);
8462
Assert.Null(semanticInfo.
Symbol
);
8519
Assert.Null(semanticInfo.
Symbol
);
8565
Assert.Equal("System.String s", semanticInfo.
Symbol
.ToTestDisplayString());
8566
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
8610
Assert.Equal("System.String s", semanticInfo.
Symbol
.ToTestDisplayString());
8611
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
8649
Assert.Equal("lambda expression", semanticInfo.
Symbol
.ToTestDisplayString());
8650
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
8689
Assert.Null(semanticInfo.
Symbol
);
8731
Assert.Null(semanticInfo.
Symbol
);
8773
Assert.Null(semanticInfo.
Symbol
);
8814
Assert.Null(semanticInfo.
Symbol
);
8856
Assert.Equal("System.Boolean x", semanticInfo.
Symbol
.ToTestDisplayString());
8857
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
8898
Assert.Equal("System.Boolean x", semanticInfo.
Symbol
.ToTestDisplayString());
8899
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
8938
Assert.Null(semanticInfo.
Symbol
);
9067
Assert.Null(semanticInfo.
Symbol
);
9128
Assert.Null(semanticInfo.
Symbol
);
9311
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
9312
Assert.Equal("System.String", semanticInfo.
Symbol
.ToTestDisplayString());
9363
Assert.Null(semanticInfo.
Symbol
);
9422
Assert.Null(semanticInfo.
Symbol
);
9453
Assert.Null(semanticInfo.
Symbol
);
9533
Assert.Null(semanticInfo.
Symbol
);
9569
Assert.Null(semanticInfo.
Symbol
);
9619
Assert.Null(semanticInfo.
Symbol
);
9674
Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.Description.Description(string)", semanticInfo.
Symbol
.ToDisplayString());
9725
Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.DescriptionAttribute.DescriptionAttribute(string)", semanticInfo.
Symbol
.ToDisplayString());
9785
Assert.Null(semanticInfo.
Symbol
);
9836
Assert.Null(semanticInfo.
Symbol
);
9891
Assert.Null(semanticInfo.
Symbol
);
9922
Assert.Equal("A1..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
9923
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
9956
Assert.Equal("System.ObsoleteAttribute..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
9957
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
9992
Assert.Equal("System.ObsoleteAttribute..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
9993
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
10028
Assert.Equal("System.ObsoleteAttribute..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
10029
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
10064
Assert.Equal("System.ObsoleteAttribute..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
10065
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
10108
Assert.Equal("AttributeClass", semanticInfo.
Symbol
.ToTestDisplayString());
10109
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
10116
Assert.False(SyntaxFacts.IsAttributeName(((SourceNamedTypeSymbol)((CSharp.Symbols.PublicModel.NamedTypeSymbol)semanticInfo.
Symbol
).UnderlyingNamedTypeSymbol).SyntaxReferences.First().GetSyntax()),
10145
Assert.Equal("AttributeClass", semanticInfo.
Symbol
.ToTestDisplayString());
10146
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
10153
Assert.False(SyntaxFacts.IsAttributeName(((SourceNamedTypeSymbol)((CSharp.Symbols.PublicModel.NamedTypeSymbol)semanticInfo.
Symbol
).UnderlyingNamedTypeSymbol).SyntaxReferences.First().GetSyntax()),
10182
Assert.Null(semanticInfo.
Symbol
);
10221
Assert.Null(semanticInfo.
Symbol
);
10252
Assert.Null(semanticInfo.
Symbol
);
10287
Assert.Null(semanticInfo.
Symbol
);
10322
Assert.Null(semanticInfo.
Symbol
);
10356
Assert.Null(semanticInfo.
Symbol
);
10390
Assert.Null(semanticInfo.
Symbol
);
10432
Assert.Null(semanticInfo.
Symbol
);
10471
Assert.Null(semanticInfo.
Symbol
);
10498
Assert.Null(semanticInfo.
Symbol
);
10527
Assert.Null(semanticInfo.
Symbol
);
10563
Assert.Null(semanticInfo.
Symbol
);
10605
Assert.Null(semanticInfo.
Symbol
);
10642
Assert.Null(semanticInfo.
Symbol
);
10679
Assert.Null(semanticInfo.
Symbol
);
10718
Assert.Null(semanticInfo.
Symbol
);
10761
Assert.Null(semanticInfo.
Symbol
);
10803
Assert.Null(semanticInfo.
Symbol
);
10840
Assert.Null(semanticInfo.
Symbol
);
10909
Assert.Null(semanticInfo.
Symbol
);
10939
Assert.NotNull(semanticInfo.
Symbol
);
10940
Assert.Equal("Program..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
10959
Assert.NotNull(semanticInfo.
Symbol
);
11149
Assert.Null(semanticInfo.
Symbol
);
11193
Assert.Equal("Goo", semanticInfo.
Symbol
.ToTestDisplayString());
11227
Assert.Null(semanticInfo.
Symbol
);
11271
Assert.Equal("System.Int16 Constants.k", semanticInfo.
Symbol
.ToTestDisplayString());
11272
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
11308
Assert.Equal("System.Int32 Class1.i", semanticInfo.
Symbol
.ToTestDisplayString());
11309
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
11345
Assert.Equal("System.Int32 Class1.i", semanticInfo.
Symbol
.ToTestDisplayString());
11346
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
11385
Assert.Equal("System.Int32 Class1.i", semanticInfo.
Symbol
.ToTestDisplayString());
11386
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
11432
Assert.Equal("System.Int32", semanticInfo.
Symbol
.ToTestDisplayString());
11433
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
11465
Assert.Equal("System.Boolean System.Boolean.op_Equality(System.Boolean left, System.Boolean right)", semanticInfo.
Symbol
.ToTestDisplayString());
11502
Assert.Null(semanticInfo.
Symbol
);
11540
Assert.Null(semanticInfo.
Symbol
);
11577
Assert.Null(semanticInfo.
Symbol
);
11612
Assert.Equal("System.Runtime.CompilerServices.IndexerNameAttribute..ctor(System.String indexerName)", semanticInfo.
Symbol
.ToTestDisplayString());
11643
Assert.Equal("<global namespace>", semanticInfo.
Symbol
.ToTestDisplayString());
11644
Assert.Equal(SymbolKind.Namespace, semanticInfo.
Symbol
.Kind);
11645
Assert.True(((INamespaceSymbol)semanticInfo.
Symbol
).IsGlobalNamespace);
11677
Assert.Equal("<global namespace>", semanticInfo.
Symbol
.ToTestDisplayString());
11678
Assert.Equal(SymbolKind.Namespace, semanticInfo.
Symbol
.Kind);
11679
Assert.True(((INamespaceSymbol)semanticInfo.
Symbol
).IsGlobalNamespace);
11715
Assert.Equal("System.Int32 Program.y", semanticInfo.
Symbol
.ToTestDisplayString());
11716
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
11760
Assert.Equal("NS1", semanticInfo.
Symbol
.ToTestDisplayString());
11761
Assert.Equal(SymbolKind.Namespace, semanticInfo.
Symbol
.Kind);
11800
Assert.Null(semanticInfo.
Symbol
);
11836
Assert.Equal("System.Int32[] a", semanticInfo.
Symbol
.ToTestDisplayString());
11837
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
11871
Assert.Null(semanticInfo.
Symbol
);
11906
Assert.Equal("System.Int32[][,,] a3", semanticInfo.
Symbol
.ToTestDisplayString());
11907
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
11942
Assert.Null(semanticInfo.
Symbol
);
11978
Assert.Equal("?[] array1", semanticInfo.
Symbol
.ToTestDisplayString());
11979
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
12013
Assert.Null(semanticInfo.
Symbol
);
12048
Assert.Null(semanticInfo.
Symbol
);
12084
Assert.Null(semanticInfo.
Symbol
);
12157
Assert.Null(semanticInfo.
Symbol
);
12191
Assert.Null(semanticInfo.
Symbol
);
12224
Assert.Null(semanticInfo.
Symbol
);
12261
Assert.Null(semanticInfo.
Symbol
);
12292
Assert.Null(semanticInfo.
Symbol
);
12327
Assert.Null(semanticInfo.
Symbol
);
12360
Assert.Null(semanticInfo.
Symbol
);
12396
Assert.Null(semanticInfo.
Symbol
);
12431
Assert.Null(semanticInfo.
Symbol
);
12458
Assert.Equal("dynamic", semanticInfo.
Symbol
.ToTestDisplayString());
12489
Assert.Null(semanticInfo.
Symbol
);
12532
Assert.Equal("Conv C", semanticInfo.
Symbol
.ToTestDisplayString());
12533
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
12573
Assert.Equal("Conv? C", semanticInfo.
Symbol
.ToTestDisplayString());
12574
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
12615
Assert.Equal("Conv C", semanticInfo.
Symbol
.ToTestDisplayString());
12616
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
12649
Assert.Equal("Conv C", semanticInfo.
Symbol
.ToTestDisplayString());
12650
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
12681
Assert.Equal("MemberInitializerTest..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
12682
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
12712
Assert.Null(semanticInfo.
Symbol
);
12744
Assert.Null(semanticInfo.
Symbol
);
12776
Assert.Equal("System.Int32 MemberInitializerTest.x", semanticInfo.
Symbol
.ToTestDisplayString());
12777
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
12808
Assert.Equal("System.Int32 MemberInitializerTest.y { get; set; }", semanticInfo.
Symbol
.ToTestDisplayString());
12809
Assert.Equal(SymbolKind.Property, semanticInfo.
Symbol
.Kind);
12851
Assert.Equal("System.Int32 Base.x", semanticInfo.
Symbol
.ToTestDisplayString());
12852
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
12888
Assert.Null(semanticInfo.
Symbol
);
12927
Assert.Equal("System.Int32 MemberInitializerTest.y { get; set; }", semanticInfo.
Symbol
.ToTestDisplayString());
12928
Assert.Equal(SymbolKind.Property, semanticInfo.
Symbol
.Kind);
12963
Assert.Null(semanticInfo.
Symbol
);
13001
Assert.Null(semanticInfo.
Symbol
);
13042
Assert.Null(semanticInfo.
Symbol
);
13073
Assert.Null(semanticInfo.
Symbol
);
13103
Assert.Equal("System.Int32 MemberInitializerTest.y", semanticInfo.
Symbol
.ToTestDisplayString());
13104
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
13134
Assert.Null(semanticInfo.
Symbol
);
13168
Assert.Null(semanticInfo.
Symbol
);
13202
Assert.Null(semanticInfo.
Symbol
);
13233
Assert.Null(semanticInfo.
Symbol
);
13268
Assert.Equal("System.Int32 MemberInitializerTest.x", semanticInfo.
Symbol
.ToTestDisplayString());
13269
Assert.Equal(SymbolKind.Field, semanticInfo.
Symbol
.Kind);
13328
Assert.Equal("B..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
13329
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
13387
Assert.Null(semanticInfo.
Symbol
);
13447
Assert.Null(semanticInfo.
Symbol
);
13508
Assert.Equal("System.Int32 i", semanticInfo.
Symbol
.ToTestDisplayString());
13509
Assert.Equal(SymbolKind.Local, semanticInfo.
Symbol
.Kind);
13566
Assert.Null(semanticInfo.
Symbol
);
13596
Assert.Null(semanticInfo.
Symbol
);
13661
Assert.Null(semanticInfo.
Symbol
);
13690
Assert.Null(semanticInfo.
Symbol
);
13746
Assert.Null(semanticInfo.
Symbol
);
13779
Assert.Null(semanticInfo.
Symbol
);
13810
Assert.Null(semanticInfo.
Symbol
);
13844
Assert.Null(semanticInfo.
Symbol
);
13878
Assert.Null(semanticInfo.
Symbol
);
13917
Assert.Null(semanticInfo.
Symbol
);
13956
Assert.Equal("System.Random", semanticInfo.
Symbol
.ToTestDisplayString());
13957
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
13983
Assert.Null(semanticInfo.
Symbol
);
14010
Assert.Null(semanticInfo.
Symbol
);
14047
Assert.Equal("InterfaceType", semanticInfo.
Symbol
.ToTestDisplayString());
14048
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
14086
Assert.Equal("InterfaceType", semanticInfo.
Symbol
.ToTestDisplayString());
14087
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
14124
Assert.Equal("CoClassType..ctor()", semanticInfo.
Symbol
.ToTestDisplayString());
14125
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
14164
Assert.Null(semanticInfo.
Symbol
);
14206
Assert.Equal("NonGenericInterfaceType", semanticInfo.
Symbol
.ToTestDisplayString());
14207
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
14250
Assert.Equal("GenericCoClassType<System.Int32, System.String>..ctor(System.String x)", semanticInfo.
Symbol
.ToTestDisplayString());
14251
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
14296
Assert.Equal("Wrapper.InterfaceType", semanticInfo.
Symbol
.ToTestDisplayString());
14342
Assert.Null(semanticInfo.
Symbol
);
14385
Assert.Null(semanticInfo.
Symbol
);
14423
Assert.Null(semanticInfo.
Symbol
);
14449
Assert.Null(semanticInfo.
Symbol
);
14464
Assert.Null(semanticInfo.
Symbol
);
14512
Assert.Null(semanticInfo.
Symbol
);
14546
Assert.Null(semanticInfo.
Symbol
);
14631
Assert.Equal("void C.Goo(System.Int32 x)", semanticInfo.
Symbol
.ToTestDisplayString());
14632
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
14670
Assert.Equal("void C.Goo()", semanticInfo.
Symbol
.ToTestDisplayString());
14671
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
15089
Assert.Equal("string.Length", semanticInfo.
Symbol
.ToDisplayString());
15090
Assert.Equal(SymbolKind.Property, semanticInfo.
Symbol
.Kind);
15118
Assert.Null(semanticInfo.
Symbol
);
15157
Assert.Equal("string.ToString()", semanticInfo.
Symbol
.ToDisplayString());
15158
Assert.Equal(SymbolKind.Method, semanticInfo.
Symbol
.Kind);
15188
Assert.Equal("string.Length", semanticInfo.
Symbol
.ToDisplayString());
15189
Assert.Equal(SymbolKind.Property, semanticInfo.
Symbol
.Kind);
15219
Assert.Equal("string.Length", semanticInfo.
Symbol
.ToDisplayString());
15220
Assert.Equal(SymbolKind.Property, semanticInfo.
Symbol
.Kind);
15250
Assert.Equal("string.Length", semanticInfo.
Symbol
.ToDisplayString());
15251
Assert.Equal(SymbolKind.Property, semanticInfo.
Symbol
.Kind);
15281
Assert.Equal("string.this[int]", semanticInfo.
Symbol
.ToDisplayString());
15282
Assert.Equal(SymbolKind.Property, semanticInfo.
Symbol
.Kind);
15308
Assert.Equal("BaselineLog", semanticInfo.
Symbol
.ToDisplayString());
15309
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
15343
Assert.Null(semanticInfo.
Symbol
);
15410
Assert.Equal("K", semanticInfo.
Symbol
.ToTestDisplayString());
15411
Assert.Equal(SymbolKind.NamedType, semanticInfo.
Symbol
.Kind);
Compilation\SemanticModelGetSemanticInfoTests_LateBound.cs (27)
41
Assert.Null(semanticInfo.
Symbol
);
65
Assert.Equal("C..ctor(out dynamic x, ref dynamic y)", semanticInfo.
Symbol
.ToTestDisplayString());
86
Assert.Equal("C..ctor(out dynamic x, dynamic y)", semanticInfo.
Symbol
.ToTestDisplayString());
112
Assert.Null(semanticInfo.
Symbol
);
144
Assert.Null(semanticInfo.
Symbol
);
170
Assert.Null(semanticInfo.
Symbol
);
205
Assert.Null(semanticInfo.
Symbol
);
229
Assert.Equal("C C.Create(System.Int32 arg)", semanticInfo.
Symbol
.ToTestDisplayString());
269
Assert.Null(semanticInfo.
Symbol
);
292
Assert.Equal("void System.Collections.Generic.List<System.Int32>.Add(System.Int32 item)", semanticInfo.
Symbol
.ToTestDisplayString());
320
Assert.Null(semanticInfo.
Symbol
);
349
Assert.Null(semanticInfo.
Symbol
);
383
Assert.Equal("System.Int32 C.bar(ref dynamic a)", semanticInfo.
Symbol
.ToTestDisplayString());
428
Assert.Null(semanticInfo.
Symbol
);
522
Assert.Null(semanticInfo.
Symbol
);
557
Assert.Equal("System.Int32 C.this[System.Int32 a] { get; set; }", semanticInfo.
Symbol
.ToTestDisplayString());
590
Assert.Null(semanticInfo.
Symbol
);
618
Assert.Null(semanticInfo.
Symbol
);
655
Assert.Equal("dynamic dynamic." + operatorNames[i] + "(dynamic value)", semanticInfo.
Symbol
.ToTestDisplayString());
682
Assert.Null(semanticInfo.
Symbol
);
712
Assert.Null(semanticInfo.
Symbol
);
716
Assert.Equal("dynamic.operator " + op + "(dynamic, dynamic)", semanticInfo.
Symbol
.ToString());
745
Assert.Null(semanticInfo.
Symbol
);
774
Assert.Null(semanticInfo.
Symbol
);
801
Assert.Null(semanticInfo.
Symbol
);
829
Assert.Equal("dynamic.operator " + op.Substring(0, op.Length - 1) + "(dynamic, dynamic)", semanticInfo.
Symbol
.ToString());
860
Assert.Equal(op == "+=" ? "void C.E.add" : "void C.E.remove", semanticInfo.
Symbol
.ToTestDisplayString());
Symbols\AnonymousTypesSemanticsTests.cs (9)
322
info1.
Symbol
.ToTestDisplayString());
426
Assert.Equal("<anonymous type: D1 module>..ctor(D1 module)", info0.
Symbol
.ToTestDisplayString());
491
Assert.Equal("System.Int32 System.Func<System.Int32, System.Int32>.Invoke(System.Int32 arg)", info1.
Symbol
.ToTestDisplayString());
589
var method = info.
Symbol
;
657
var method = info.
Symbol
;
678
var method = info.
Symbol
;
699
var method = info.
Symbol
;
922
Assert.Equal("<anonymous type: System.Int32 x, <empty anonymous type> y>..ctor(System.Int32 x, <empty anonymous type> y)", info0.
Symbol
.ToTestDisplayString());
987
Assert.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)
35
var symbol = (ILocalSymbol)semanticInfo.
Symbol
;
89
var symbol = (ILocalSymbol)semanticInfo.
Symbol
;
114
var symbol = (ILocalSymbol)semanticInfo.
Symbol
;
139
var symbol = (ILocalSymbol)semanticInfo.
Symbol
;
162
var symbol = (ILocalSymbol)semanticInfo.
Symbol
;
Symbols\Source\UsingAliasTests.cs (24)
49
Assert.NotNull(info1.
Symbol
);
55
Assert.Equal(info1.
Symbol
, alias1.Target);
58
Assert.NotNull(info2.
Symbol
);
59
var b2 = info2.
Symbol
;
64
Assert.NotNull(info3.
Symbol
);
65
var b3 = info3.
Symbol
;
70
Assert.Null(info4.
Symbol
); // no "using System;"
109
Assert.NotNull(info1.
Symbol
);
115
Assert.Equal(info1.
Symbol
, alias1.Target);
118
Assert.NotNull(info2.
Symbol
);
119
var b2 = info2.
Symbol
;
124
Assert.NotNull(info3.
Symbol
);
125
var b3 = info3.
Symbol
;
130
Assert.Null(info4.
Symbol
); // no "using System;"
173
Assert.NotNull(info2.
Symbol
);
174
var b2 = info2.
Symbol
;
179
Assert.NotNull(info3.
Symbol
);
180
var b3 = info3.
Symbol
;
185
Assert.Null(info4.
Symbol
); // no "using System;"
231
Assert.NotNull(info2.
Symbol
);
232
var b2 = info2.
Symbol
;
237
Assert.NotNull(info3.
Symbol
);
238
var b3 = info3.
Symbol
;
243
Assert.Null(info4.
Symbol
); // no "using System;"
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
FunctionPointerUtilities.cs (3)
219
AssertEx.Equal(expectedSymbol, semanticInfo.
Symbol
.ToTestDisplayString(includeNonNullable: false));
224
Assert.Null(semanticInfo.
Symbol
);
230
Assert.Null(semanticInfo.
Symbol
);