103 references to ToTestDisplayString
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (19)
CodeGen\CodeGenFunctionPointersTests.cs (7)
3075AssertEx.Equal(expectedMembers, model.GetMemberGroup(addressOfs[0].Operand).Select(m => m.ToTestDisplayString(includeNonNullable: false))); 3076AssertEx.Equal(expectedMembers, model.GetMemberGroup(addressOfs[1].Operand).Select(m => m.ToTestDisplayString(includeNonNullable: false))); 4117AssertEx.Equal(new[] { "void C.M1()" }, model.GetMemberGroup(methodGroup1).Select(m => m.ToTestDisplayString(includeNonNullable: false))); 7409Assert.Equal("System.String", lambdaSymbol.ReturnType.ToTestDisplayString(includeNonNullable: false)); 10764typeInfo.Type.ToTestDisplayString(includeNonNullable: false)); 10766typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false)); 10773typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false));
CodeGen\CodeGenTupleTest.cs (12)
6804Assert.Equal("(System.Int32, System.String)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6811Assert.Equal("(System.Int32, System.String?)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6817Assert.Equal("(System.Int32, System.String)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6835Assert.Equal("(System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6842Assert.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)); 6873Assert.Equal("(System.Int32, System.String)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6880Assert.Equal("(System.Int32, System.String?)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6886Assert.Equal("(System.Int32, System.String)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6904Assert.Equal("(System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)", tuple2.ToTestDisplayString(includeNonNullable: true)); 6911Assert.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));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (7)
Semantics\PatternMatchingTests_ListPatterns.cs (7)
3334Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 3341Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 4100Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 4187Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 4264Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 4379Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true)); 4571Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
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 (37)
Semantics\FunctionPointerTests.cs (1)
3947Assert.Equal("delegate*<?, System.Void>", semanticInfo.Symbol.ToTestDisplayString(includeNonNullable: false));
Semantics\MethodTypeInferenceTests.cs (3)
844Assert.Equal(type, model.GetTypeInfo(declaration).Type.ToTestDisplayString(includeNonNullable: true)); 852Assert.Equal(type, discardSymbol.Type.ToTestDisplayString(includeNonNullable: true)); 853Assert.Equal(type, model.GetTypeInfo(discard).Type.ToTestDisplayString(includeNonNullable: true));
Semantics\NullableReferenceTypesTests.cs (9)
5163Assert.Equal("T?", local.Type.ToTestDisplayString(includeNonNullable: true)); 10526Assert.Equal("System.String!", model.GetTypeInfo(type1).Type.ToTestDisplayString(includeNonNullable: true)); 10530Assert.Equal("System.String?", model.GetTypeInfo(type2).Type.ToTestDisplayString(includeNonNullable: true)); 90555Assert.Equal("System.Collections.Generic.Dictionary<System.String!, System.String?>? d2", symbol.ToTestDisplayString(includeNonNullable: true)); 109468Assert.Equal("B[]", model.GetTypeInfo(arrays[0]).Type.ToTestDisplayString(includeNonNullable: true)); 109469Assert.Equal("C![]", model.GetTypeInfo(arrays[1]).Type.ToTestDisplayString(includeNonNullable: true)); 110078model.GetSpeculativeTypeInfo(decl.Identifier.SpanStart, type, SpeculativeBindingOption.BindAsTypeOrNamespace).Type.ToTestDisplayString(includeNonNullable: true)); 110304model.GetTypeInfo(type).Type.ToTestDisplayString(includeNonNullable: true)); 150520Assert.Equal(expectedDisplay, symbol.ToTestDisplayString(includeNonNullable: true));
Semantics\RecordStructTests.cs (2)
3453verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 3555verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false));
Semantics\RecordTests.cs (17)
14165verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14267verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14387verifier.Compilation.GetMember("C.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14597verifier.Compilation.GetMember("C.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14677comp.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14725comp.GetMember("C.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14728comp.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14781comp.GetMember("C.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14784comp.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14858comp.GetMember("A.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14861comp.GetMember("B1.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14864comp.GetMember("B2.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 14867comp.GetMember("B3.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 15443Assert.Equal("void B.Deconstruct(out System.Int32 X, out System.Int32 Y)", verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 15479Assert.Equal("void B.Deconstruct(out System.Int32 X, out System.Int32 Y)", verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 15624Assert.Equal("void B.Deconstruct(out System.Int32 X)", verifier.Compilation.GetMember("B.Deconstruct").ToTestDisplayString(includeNonNullable: false)); 15659Assert.Equal("void B.Deconstruct(out System.Int32 X)", deconstruct.ToTestDisplayString(includeNonNullable: false));
Semantics\TargetTypedConditionalOperatorTests.cs (5)
350Assert.Equal("?", actualType.ToTestDisplayString(includeNonNullable: false)); 355Assert.Equal(naturalType, model.GetTypeInfo(conditionalExpr).Type.ToTestDisplayString(includeNonNullable: false)); 359Assert.Equal(convertedType, model.GetTypeInfo(conditionalExpr).ConvertedType.ToTestDisplayString(includeNonNullable: false)); 364Assert.Equal(convertedType, model.GetTypeInfo(conditionalExpr.WhenTrue).ConvertedType.ToTestDisplayString(includeNonNullable: false)); //in parent to catch conversion 365Assert.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)
2663Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2666Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2669Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2672Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2675Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2678Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2681Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2690Assert.Equal("<empty anonymous type>", type.ToTestDisplayString(includeNonNullable: true)); 2703Assert.Equal("<anonymous type: System.Object P, System.String Q>", type.ToTestDisplayString(includeNonNullable: true)); 2709Assert.Equal("<anonymous type: System.Object! P, System.String? Q>", type.ToTestDisplayString(includeNonNullable: true)); 3039Assert.Equal("Pair<System.Object, System.String>", type.ToTestDisplayString(includeNonNullable: true)); 3047Assert.Equal("Pair<System.Object?, System.String!>", type.ToTestDisplayString(includeNonNullable: true)); 3074Assert.Equal("void Program.M<System.Object, System.String>()", type.ToTestDisplayString(includeNonNullable: true)); 3082Assert.Equal("void Program.M<System.Object?, System.String!>()", type.ToTestDisplayString(includeNonNullable: true));
Compilation\SemanticModelAPITests.cs (2)
3787Assert.Equal("System.String", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false)); 3794Assert.Equal("C", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false));
Symbols\ExtendedPartialMethodsTests.cs (2)
3438Assert.Equal(implSymbol.ToTestDisplayString(includeNonNullable: false), defSymbol.ToTestDisplayString(includeNonNullable: false));
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1579Assert.Equal("delegate*<C!, C?, C>", ptr.ToTestDisplayString(includeNonNullable: true));
Symbols\Source\NullablePublicAPITests.cs (14)
3413Assert.Equal(expected, method.ToTestDisplayString(includeNonNullable: true)); 3458Assert.Equal(expected, method.ToTestDisplayString(includeNonNullable: true)); 3700Assert.Equal("System.String!", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: true)); 3707Assert.Equal("C!", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: true)); 3735Assert.Equal("System.String!", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: true)); 3742Assert.Equal("C!", typeInfo.ConvertedType.ToTestDisplayString(includeNonNullable: true)); 5012AssertEx.Equal("(System.String a, System.String b)", model.GetTypeInfo(tupleLiteral).Type.ToTestDisplayString(includeNonNullable: false)); 5063AssertEx.Equal("System.String?", model.GetTypeInfo(assignmentsInLambda[0].Right).Type.ToTestDisplayString(includeNonNullable: true)); 5064AssertEx.Equal("System.String!", model.GetTypeInfo(assignmentsInLambda[2].Right).Type.ToTestDisplayString(includeNonNullable: true)); 5076AssertEx.Equal("System.String!", model.GetTypeInfo(switchExpressionInput).Type.ToTestDisplayString(includeNonNullable: true)); 5080AssertEx.Equal("System.String!", model.GetTypeInfo(switchExpressionInput).Type.ToTestDisplayString(includeNonNullable: true)); 5111Assert.Equal("System.Object?", model.GetTypeInfo(binaryRight).Type.ToTestDisplayString(includeNonNullable: true)); 5143Assert.Equal("System.Object?", model.GetTypeInfo(binaryRight).Type.ToTestDisplayString(includeNonNullable: true)); 5171Assert.Equal("System.Object?", model.GetTypeInfo(binaryRightArgument).Type.ToTestDisplayString(includeNonNullable: true));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (6)
FunctionPointerUtilities.cs (6)
155AssertEx.Equal(expectedType, semanticInfo.Type.ToTestDisplayString(includeNonNullable: false)); 164AssertEx.Equal(expectedConvertedType, semanticInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false)); 196AssertEx.Equal(expectedSymbolCandidates, semanticInfo.MemberGroup.Select(s => s.ToTestDisplayString(includeNonNullable: false))); 200Assert.Contains(semanticInfo.MemberGroup, actual => actual.ToTestDisplayString(includeNonNullable: false) == expectedSymbol); 217AssertEx.Equal(expectedSymbol, semanticInfo.Symbol.ToTestDisplayString(includeNonNullable: false)); 224AssertEx.Equal(expectedSymbolCandidates, semanticInfo.CandidateSymbols.Select(s => s.ToTestDisplayString(includeNonNullable: false)));