196 references to ToTestDisplayString
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (19)
CodeGen\CodeGenFunctionPointersTests.cs (7)
3083AssertEx.Equal(expectedMembers, model.GetMemberGroup(addressOfs[0].Operand).Select(m => m.ToTestDisplayString(includeNonNullable: false))); 3084AssertEx.Equal(expectedMembers, model.GetMemberGroup(addressOfs[1].Operand).Select(m => m.ToTestDisplayString(includeNonNullable: false))); 4125AssertEx.Equal(new[] { "void C.M1()" }, model.GetMemberGroup(methodGroup1).Select(m => m.ToTestDisplayString(includeNonNullable: false))); 7420Assert.Equal("System.String", lambdaSymbol.ReturnType.ToTestDisplayString(includeNonNullable: false)); 10800typeInfo.Type.ToTestDisplayString(includeNonNullable: false)); 10802typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false)); 10809typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false));
CodeGen\CodeGenTupleTest.cs (12)
6809Assert.Equal("(System.Int32, System.String)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6816Assert.Equal("(System.Int32, System.String?)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6822Assert.Equal("(System.Int32, System.String)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6840Assert.Equal("(System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6847Assert.Equal("(System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6852Assert.Equal("(System.Object?, System.Object?, System.Object?, System.Object?, System.Object?, System.Object?, System.Object?, System.Object?, System.Object?)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6878Assert.Equal("(System.Int32, System.String)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6885Assert.Equal("(System.Int32, System.String?)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6891Assert.Equal("(System.Int32, System.String)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6909Assert.Equal("(System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6916Assert.Equal("(System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6921Assert.Equal("(System.Object?, System.Object?, System.Object?, System.Object?, System.Object?, System.Object?, System.Object?, System.Object?, System.Object?)", tuple2.ToTestDisplayString(includeNonNullable: true));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (113)
FieldKeywordTests.cs (3)
619AssertEx.Equal("System.Collections.Generic.List<System.String!>?", fieldType.Type.ToTestDisplayString(includeNonNullable: true)); 668AssertEx.Equal("System.Collections.Generic.List<System.String!>!", fieldType.Type.ToTestDisplayString(includeNonNullable: true)); 709AssertEx.Equal("System.Collections.Generic.List<System.String?>!", fieldType.Type.ToTestDisplayString(includeNonNullable: true));
Semantics\CollectionExpressionTests.cs (22)
34255model.GetSymbolInfo(invocation0).Symbol.ToTestDisplayString(includeNonNullable: true)); 34259model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 34303model.GetSymbolInfo(invocation0).Symbol.ToTestDisplayString(includeNonNullable: true)); 34307model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 34311model.GetSymbolInfo(invocation2).Symbol.ToTestDisplayString(includeNonNullable: true)); 34360model.GetSymbolInfo(invocation0).Symbol.ToTestDisplayString(includeNonNullable: true)); 34364model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 34459model.GetSymbolInfo(invocation0).Symbol.ToTestDisplayString(includeNonNullable: true)); 34463model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 34467model.GetSymbolInfo(invocation2).Symbol.ToTestDisplayString(includeNonNullable: true)); 35331model.GetSymbolInfo(invocation0).Symbol.ToTestDisplayString(includeNonNullable: true)); 35335model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 35339model.GetSymbolInfo(invocation2).Symbol.ToTestDisplayString(includeNonNullable: true)); 35343model.GetSymbolInfo(invocation3).Symbol.ToTestDisplayString(includeNonNullable: true)); 35347model.GetSymbolInfo(invocation4).Symbol.ToTestDisplayString(includeNonNullable: true)); 35427model.GetSymbolInfo(invocation0).Symbol.ToTestDisplayString(includeNonNullable: true)); 35431model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 35435model.GetSymbolInfo(invocation2).Symbol.ToTestDisplayString(includeNonNullable: true)); 35439model.GetSymbolInfo(invocation3).Symbol.ToTestDisplayString(includeNonNullable: true)); 35443model.GetSymbolInfo(invocation4).Symbol.ToTestDisplayString(includeNonNullable: true)); 35822model.GetSymbolInfo(invocation0).Symbol.ToTestDisplayString(includeNonNullable: true)); 35826model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true));
Semantics\CollectionExpressionTests_WithElement_Nullable.cs (4)
44AssertEx.Equal(expected, symbolInfo.Symbol.ToTestDisplayString(includeNonNullable: true)); 253AssertEx.Equal("System.String! C.Goo<System.String!>(MyList<System.String!>! list)", symbolInfo.Symbol.ToTestDisplayString(true)); 518AssertEx.Equal("void Program.Goo<System.String!>(MyCollection<System.String!>! list)", symbolInfo.Symbol.ToTestDisplayString(true)); 577AssertEx.Equal("void Program.Goo<System.String!>(MyCollection<System.String!>! list)", symbolInfo.Symbol.ToTestDisplayString(true));
Semantics\ExtensionTests.cs (53)
4631AssertEx.Equal("System.String? receiver", model.GetDeclaredSymbol(parameters[0]).ToTestDisplayString(includeNonNullable: true)); 4632AssertEx.Equal("System.String?", model.GetDeclaredSymbol(parameters[1]).ToTestDisplayString(includeNonNullable: true)); 13864AssertEx.Equal("void E.extension<System.Object?>(System.Object?).Method()", model.GetSymbolInfo(memberAccess).Symbol.ToTestDisplayString(includeNonNullable: true)); 46524AssertEx.Equal("System.Object? E.extension<System.Object?>(System.Object?).M()", model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 46527AssertEx.Equal("System.Object! E.extension<System.Object!>(System.Object!).M()", model.GetSymbolInfo(invocation2).Symbol.ToTestDisplayString(includeNonNullable: true)); 46572AssertEx.Equal("System.Object? E.extension<System.Object?>(System.Object?).M()", model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 46575AssertEx.Equal("System.Object! E.extension<System.Object!>(System.Object!).M()", model.GetSymbolInfo(invocation2).Symbol.ToTestDisplayString(includeNonNullable: true)); 46613AssertEx.Equal("System.Object? E.extension<System.Object?>(System.Object?).M<System.Object?>(System.Object? u)", model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 46616AssertEx.Equal("System.Object! E.extension<System.Object!>(System.Object!).M<System.Object!>(System.Object! u)", model.GetSymbolInfo(invocation2).Symbol.ToTestDisplayString(includeNonNullable: true)); 46652AssertEx.Equal("System.Object? E.extension<System.Object?>(C<System.Object?>!).M()", model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 46655AssertEx.Equal("System.Object! E.extension<System.Object!>(C<System.Object!>!).M()", model.GetSymbolInfo(invocation2).Symbol.ToTestDisplayString(includeNonNullable: true)); 46877AssertEx.Equal("void E.extension(System.Object?).M()", model.GetSymbolInfo(memberAccess1).Symbol.ToTestDisplayString(includeNonNullable: true)); 46883AssertEx.Equal("void E.extension(System.Object?).M()", model.GetSymbolInfo(memberAccess2).Symbol.ToTestDisplayString(includeNonNullable: true)); 46918AssertEx.Equal("void E.extension(System.Object!).M()", model.GetSymbolInfo(memberAccess1).Symbol.ToTestDisplayString(includeNonNullable: true)); 46924AssertEx.Equal("void E.extension(System.Object!).M()", model.GetSymbolInfo(memberAccess2).Symbol.ToTestDisplayString(includeNonNullable: true)); 46985AssertEx.Equal("System.Object E.extension<System.Object>(System.Object).M()", model.GetSymbolInfo(memberAccess1).Symbol.ToTestDisplayString(includeNonNullable: true)); 46989AssertEx.Equal("System.Func<System.Object>?", model.GetTypeInfo(varDeclaration1.Type).Type.ToTestDisplayString(includeNonNullable: true)); 46993AssertEx.Equal("System.Object System.Object!.M2<System.Object>()", model.GetSymbolInfo(memberAccess2).Symbol.ToTestDisplayString(includeNonNullable: true)); 46997AssertEx.Equal("System.Func<System.Object>?", model.GetTypeInfo(varDeclaration2.Type).Type.ToTestDisplayString(includeNonNullable: true)); 47001AssertEx.Equal("System.Object E.extension<System.Object>(System.Object).M()", model.GetSymbolInfo(memberAccess3).Symbol.ToTestDisplayString(includeNonNullable: true)); 47005AssertEx.Equal("System.Object System.Object!.M2<System.Object>()", model.GetSymbolInfo(memberAccess4).Symbol.ToTestDisplayString(includeNonNullable: true)); 47009AssertEx.Equal("System.Object E.extension<System.Object>(System.Object).M()", model.GetSymbolInfo(memberAccess5).Symbol.ToTestDisplayString(includeNonNullable: true)); 47013AssertEx.Equal("System.Func<System.Object>?", model.GetTypeInfo(varDeclaration3.Type).Type.ToTestDisplayString(includeNonNullable: true)); 47121AssertEx.Equal("System.Object E.extension<System.Object>(C<System.Object>!).M()", model.GetSymbolInfo(invocation1).Symbol.ToTestDisplayString(includeNonNullable: true)); 47125AssertEx.Equal("System.Func<System.Object>?", model.GetTypeInfo(localDeclaration1.Type).Type.ToTestDisplayString(includeNonNullable: true)); 47129AssertEx.Equal("System.Object E.extension<System.Object>(C<System.Object>!).M()", model.GetSymbolInfo(invocation2).Symbol.ToTestDisplayString(includeNonNullable: true)); 47133AssertEx.Equal("System.Func<System.Object>?", model.GetTypeInfo(localDeclaration2.Type).Type.ToTestDisplayString(includeNonNullable: true)); 47168AssertEx.Equal("System.Object E.extension<System.Object>(C<System.Object>!).M()", model.GetSymbolInfo(memberAccess1).Symbol.ToTestDisplayString(includeNonNullable: true)); 47172AssertEx.Equal("System.Object E.extension<System.Object>(C<System.Object>!).M()", model.GetSymbolInfo(memberAccess2).Symbol.ToTestDisplayString(includeNonNullable: true)); 47221AssertEx.Equal("System.Object! E.extension<System.Object>(C<System.Object!>!).M()", model.GetSymbolInfo(memberAccess1).Symbol.ToTestDisplayString(includeNonNullable: true)); 47225AssertEx.Equal("System.Func<System.Object!>?", model.GetTypeInfo(varDeclaration1.Type).Type.ToTestDisplayString(includeNonNullable: true)); 47229AssertEx.Equal("System.Object! E.extension<System.Object>(C<System.Object!>!).M()", model.GetSymbolInfo(memberAccess2).Symbol.ToTestDisplayString(includeNonNullable: true)); 47232AssertEx.Equal("System.Func<System.Object!>?", model.GetTypeInfo(varDeclaration2.Type).Type.ToTestDisplayString(includeNonNullable: true)); 47277model.GetDeconstructionInfo(assignment1).Method.ToTestDisplayString(includeNonNullable: true)); 47282model.GetDeconstructionInfo(assignment2).Method.ToTestDisplayString(includeNonNullable: true)); 47287model.GetDeconstructionInfo(assignment3).Method.ToTestDisplayString(includeNonNullable: true)); 47320model.GetDeconstructionInfo(assignment1).Method.ToTestDisplayString(includeNonNullable: true)); 47646model.GetDeconstructionInfo(assignment).Method.ToTestDisplayString(includeNonNullable: true)); 47685model.GetDeconstructionInfo(assignments[0]).Method.ToTestDisplayString(includeNonNullable: true)); 47688model.GetDeconstructionInfo(assignments[1]).Method.ToTestDisplayString(includeNonNullable: true)); 49369model.GetForEachStatementInfo(loop).GetEnumeratorMethod.ToTestDisplayString(includeNonNullable: true)); 49400model.GetForEachStatementInfo(loop).GetEnumeratorMethod.ToTestDisplayString(includeNonNullable: true)); 49629model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true)); 49663model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true)); 49667model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true)); 49789model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true)); 49950model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true)); 49983model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true)); 50019model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true)); 50055model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true)); 50165model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true)); 50292model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true)); 50402model.GetSymbolInfo(assignment.Left).Symbol.ToTestDisplayString(includeNonNullable: true));
Semantics\ExtensionTests2.cs (7)
1379AssertEx.Equal("System.Object? E.extension<System.Object?>(System.Object?).P { get; }", model.GetSymbolInfo(propertyAccess1).Symbol.ToTestDisplayString(includeNonNullable: true)); 1382AssertEx.Equal("System.Object! E.extension<System.Object!>(System.Object!).P { get; }", model.GetSymbolInfo(propertyAccess2).Symbol.ToTestDisplayString(includeNonNullable: true)); 1459model.GetSymbolInfo(propertyAccess).Symbol.ToTestDisplayString(includeNonNullable: true)); 1495AssertEx.Equal("System.Object? E.extension<System.Object?>(System.Object?).P { get; }", model.GetSymbolInfo(propertyAccess1).Symbol.ToTestDisplayString(includeNonNullable: true)); 1498AssertEx.Equal("System.Object! E.extension<System.Object!>(System.Object!).P { get; }", model.GetSymbolInfo(propertyAccess2).Symbol.ToTestDisplayString(includeNonNullable: true)); 2791model.GetSymbolInfo(propertyAccess).Symbol.ToTestDisplayString(includeNonNullable: true)); 36658AssertEx.Equal("void E.extension(C!).Extension<System.String?>(params C<System.String?>![]! values)", symbol.Symbol.ToTestDisplayString(includeNonNullable: true));
Semantics\PatternMatchingTests_ListPatterns.cs (7)
3387Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 3394Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 4157Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 4244Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 4321Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 4436Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 4628Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
Semantics\RecordTests.cs (17)
14250verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14352verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14472verifier.Compilation.GetMember("C.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14682verifier.Compilation.GetMember("C.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14762comp.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14810comp.GetMember("C.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14813comp.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14866comp.GetMember("C.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14869comp.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14943comp.GetMember("A.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14946comp.GetMember("B1.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14949comp.GetMember("B2.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14952comp.GetMember("B3.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 15528Assert.Equal("void B.Deconstruct(out System.Int32 X, out System.Int32 Y)", verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 15564Assert.Equal("void B.Deconstruct(out System.Int32 X, out System.Int32 Y)", verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 15709Assert.Equal("void B.Deconstruct(out System.Int32 X)", verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 15744Assert.Equal("void B.Deconstruct(out System.Int32 X)", deconstruct.ToTestDisplayString(includeNonNullable: false));
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests.cs (1)
721.ForAll(_ => Assert.Equal("System.String System.String.op_Addition(System.String left, System.String right)", model.GetSymbolInfo(fieldInitializer).Symbol.ToTestDisplayString(includeNonNullable: false)));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (24)
Semantics\AwaitExpressionTests.cs (2)
342AssertEx.Equal("void System.Runtime.CompilerServices.AsyncHelpers.Await(System.Threading.Tasks.Task! task)", info.RuntimeAwaitMethod.ToTestDisplayString(includeNonNullable: true)); 388AssertEx.Equal("void System.Runtime.CompilerServices.AsyncHelpers.UnsafeAwaitAwaiter<MyAwaiter?>(MyAwaiter? awaiter)", info.RuntimeAwaitMethod.ToTestDisplayString(includeNonNullable: true));
Semantics\ConstantTests.cs (2)
4082Assert.Equal("System.String x", model.GetDeclaredSymbol(xDeclarator).ToTestDisplayString(includeNonNullable: false)); 4103Assert.Equal("System.String x", model.GetDeclaredSymbol(xDeclarator).ToTestDisplayString(includeNonNullable: false));
Semantics\FunctionPointerTests.cs (1)
3956Assert.Equal("delegate*<?, System.Void>", semanticInfo.Symbol.ToTestDisplayString(includeNonNullable: false));
Semantics\MethodTypeInferenceTests.cs (3)
845Assert.Equal(type, model.GetTypeInfo(declaration).Type.ToTestDisplayString(includeNonNullable: true)); 853Assert.Equal(type, discardSymbol.Type.ToTestDisplayString(includeNonNullable: true)); 854Assert.Equal(type, model.GetTypeInfo(discard).Type.ToTestDisplayString(includeNonNullable: true));
Semantics\NullableReferenceTypesTests.cs (9)
5182Assert.Equal("T?", local.Type.ToTestDisplayString(includeNonNullable: true)); 10542Assert.Equal("System.String!", model.GetTypeInfo(type1).Type.ToTestDisplayString(includeNonNullable: true)); 10546Assert.Equal("System.String?", model.GetTypeInfo(type2).Type.ToTestDisplayString(includeNonNullable: true)); 94403Assert.Equal("System.Collections.Generic.Dictionary<System.String!, System.String?>? d2", symbol.ToTestDisplayString(includeNonNullable: true)); 113310Assert.Equal("B[]", model.GetTypeInfo(arrays[0]).Type.ToTestDisplayString(includeNonNullable: true)); 113311Assert.Equal("C![]", model.GetTypeInfo(arrays[1]).Type.ToTestDisplayString(includeNonNullable: true)); 113920model.GetSpeculativeTypeInfo(decl.Identifier.SpanStart, type, SpeculativeBindingOption.BindAsTypeOrNamespace).Type.ToTestDisplayString(includeNonNullable: true)); 114146model.GetTypeInfo(type).Type.ToTestDisplayString(includeNonNullable: true)); 155053Assert.Equal(expectedDisplay, symbol.ToTestDisplayString(includeNonNullable: true));
Semantics\RecordStructTests.cs (2)
3555verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 3657verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false));
Semantics\TargetTypedConditionalOperatorTests.cs (5)
351Assert.Equal("?", actualType.ToTestDisplayString(includeNonNullable: false)); 356Assert.Equal(naturalType, model.GetTypeInfo(conditionalExpr).Type.ToTestDisplayString(includeNonNullable: false)); 360Assert.Equal(convertedType, model.GetTypeInfo(conditionalExpr).ConvertedType.ToTestDisplayString(includeNonNullable: false)); 365Assert.Equal(convertedType, model.GetTypeInfo(conditionalExpr.WhenTrue).ConvertedType.ToTestDisplayString(includeNonNullable: false)); //in parent to catch conversion 366Assert.Equal(convertedType, model.GetTypeInfo(conditionalExpr.WhenFalse).ConvertedType.ToTestDisplayString(includeNonNullable: false)); //in parent to catch conversion
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (33)
Compilation\CompilationAPITests.cs (14)
2661Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2664Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2667Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2670Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2673Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2676Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2679Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2688Assert.Equal("<empty anonymous type>", type.ToTestDisplayString(includeNonNullable: true)); 2701Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2707Assert.Equal("<anonymous type: System.Object! P, System.String? Q>", type.ToTestDisplayString(includeNonNullable: true)); 3037Assert.Equal("Pair<System.Object, System.String>", type.ToTestDisplayString(includeNonNullable: true)); 3045Assert.Equal("Pair<System.Object?, System.String!>", type.ToTestDisplayString(includeNonNullable: true)); 3072Assert.Equal("void Program.M<System.Object, System.String>()", type.ToTestDisplayString(includeNonNullable: true)); 3080Assert.Equal("void Program.M<System.Object?, System.String!>()", type.ToTestDisplayString(includeNonNullable: true));
Compilation\SemanticModelAPITests.cs (2)
3818Assert.Equal("System.String", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false)); 3825Assert.Equal("C", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false));
Symbols\ExtendedPartialMethodsTests.cs (2)
3830Assert.Equal(implSymbol.ToTestDisplayString(includeNonNullable: false), defSymbol.ToTestDisplayString(includeNonNullable: false));
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1567Assert.Equal("delegate*<C!, C?, C>", ptr.ToTestDisplayString(includeNonNullable: true));
Symbols\Source\NullablePublicAPITests.cs (14)
3412Assert.Equal(expected, method.ToTestDisplayString(includeNonNullable: true)); 3457Assert.Equal(expected, method.ToTestDisplayString(includeNonNullable: true)); 3699Assert.Equal("System.String!", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: true)); 3706Assert.Equal("C!", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: true)); 3734Assert.Equal("System.String!", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: true)); 3741Assert.Equal("C!", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: true)); 5008AssertEx.Equal("(System.String a, System.String b)", model.GetTypeInfo(tupleLiteral).Type.ToTestDisplayString(includeNonNullable: false)); 5052AssertEx.Equal("System.String?", model.GetTypeInfo(assignmentsInLambda[0].Right).Type.ToTestDisplayString(includeNonNullable: true)); 5053AssertEx.Equal("System.String!", model.GetTypeInfo(assignmentsInLambda[2].Right).Type.ToTestDisplayString(includeNonNullable: true)); 5065AssertEx.Equal("System.String!", model.GetTypeInfo(switchExpressionInput).Type.ToTestDisplayString(includeNonNullable: true)); 5069AssertEx.Equal("System.String!", model.GetTypeInfo(switchExpressionInput).Type.ToTestDisplayString(includeNonNullable: true)); 5100Assert.Equal("System.Object?", model.GetTypeInfo(binaryRight).Type.ToTestDisplayString(includeNonNullable: true)); 5132Assert.Equal("System.Object?", model.GetTypeInfo(binaryRight).Type.ToTestDisplayString(includeNonNullable: true)); 5160Assert.Equal("System.Object?", model.GetTypeInfo(binaryRightArgument).Type.ToTestDisplayString(includeNonNullable: true));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (6)
FunctionPointerUtilities.cs (6)
157AssertEx.Equal(expectedType, semanticInfo.Type.ToTestDisplayString(includeNonNullable: false)); 166AssertEx.Equal(expectedConvertedType, semanticInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false)); 198AssertEx.Equal(expectedSymbolCandidates, semanticInfo.MemberGroup.Select(s => s.ToTestDisplayString(includeNonNullable: false))); 202Assert.Contains(semanticInfo.MemberGroup, actual => actual.ToTestDisplayString(includeNonNullable: false) == expectedSymbol); 219AssertEx.Equal(expectedSymbol, semanticInfo.Symbol.ToTestDisplayString(includeNonNullable: false)); 226AssertEx.Equal(expectedSymbolCandidates, semanticInfo.CandidateSymbols.Select(s => s.ToTestDisplayString(includeNonNullable: false)));