156 references to ToTestDisplayString
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
CodeGen\CodeGenDeconstructTests.cs (1)
5609Assert.Equal("var", xType.ToTestDisplayString());
CodeGen\CodeGenTupleTest.cs (8)
943Assert.Equal("(System.Int32 e1, System.Int32)", partialNames.TypeWithAnnotations.ToTestDisplayString()); 948Assert.Equal("(System.Int32, System.Int32)", allNullNames.TypeWithAnnotations.ToTestDisplayString()); 954Assert.Equal("System.ValueTuple<(System.Int32 e1, System.Int32)>", partialParamType.ToTestDisplayString()); 960Assert.Equal("System.ValueTuple<(System.Int32, System.Int32)>", allNullParamType.ToTestDisplayString()); 1620Assert.Equal(new[] { "System.Int32", "System.String" }, xSymbol.TupleElementTypesWithAnnotations.SelectAsArray(t => t.ToTestDisplayString())); 11210Assert.Equal(new[] { "System.Int32", "System.Int32" }, m1Tuple.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Select(t => t.ToTestDisplayString())); 22284Assert.Equal("(System.Int32, System.Int32)[missing]", methodM.ReturnTypeWithAnnotations.ToTestDisplayString()); 22324Assert.Equal("(System.Int32 Item1, System.Int32 Bob)[missing]", methodM.ReturnTypeWithAnnotations.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (28)
Attributes\AttributeTests_Dynamic.cs (1)
538Assert.Equal("System.Boolean[]", dynamicAttribute.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString());
Attributes\AttributeTests_NativeInteger.cs (1)
1499Assert.Equal("System.Boolean[]", field.TypeWithAnnotations.ToTestDisplayString());
Attributes\AttributeTests_Nullable.cs (12)
1391Assert.Equal("A?", type.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 1393Assert.Equal("A!", type.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 1438Assert.Equal("A<System.Object>", type.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 1499Assert.Equal("A<System.Object?>!", type.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 1501Assert.Equal("A<System.Object!>!", type.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 1550Assert.Equal("T?", type.TypeParameters[1].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 4827type.GetMember<FieldSymbol>("Nested").TypeWithAnnotations.ToTestDisplayString()); 4830type.GetMember<FieldSymbol>("Long").TypeWithAnnotations.ToTestDisplayString()); 4945type.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString()); 4948type.GetMember<FieldSymbol>("Field").TypeWithAnnotations.ToTestDisplayString()); 4951type.GetMember<EventSymbol>("Event").TypeWithAnnotations.ToTestDisplayString()); 5003Assert.Equal("System.Byte[]", field.TypeWithAnnotations.ToTestDisplayString());
Attributes\AttributeTests_Synthesized.cs (2)
65Assert.Equal("System.Int32", attribute.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString()); 93Assert.Equal("System.Diagnostics.DebuggableAttribute.DebuggingModes", attribute.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString());
Attributes\AttributeTests_Tuples.cs (1)
629Assert.Equal("System.String[]", tupleAttr.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString());
FieldKeywordTests.cs (1)
11702Assert.Equal("System.Int32?", sourceField.TypeWithAnnotations.ToTestDisplayString());
RefStructInterfacesTests.cs (8)
4958Assert.Equal("I1", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString()); 4985Assert.Equal("I1", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString()); 5016Assert.Equal("C1", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString()); 5070Assert.Equal("System.Enum", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString()); 5517Assert.Equal("C", t1.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString()); 5522Assert.Equal("C", t2.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString()); 5646Assert.Equal("C", t1.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString()); 5651Assert.Equal("C", t2.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString());
Semantics\ExtensionTests.cs (2)
4342AssertEx.Equal("System.String?", extensions[0].ExtensionParameter.TypeWithAnnotations.ToTestDisplayString()); 4343AssertEx.Equal("System.String?", extensions[1].ExtensionParameter.TypeWithAnnotations.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (110)
Semantics\ForEachTests.cs (2)
1638Assert.Equal("C.var", info.ElementTypeWithAnnotations.ToTestDisplayString()); 1649Assert.Equal("C.var", boundNode.IterationVariables.Single().TypeWithAnnotations.ToTestDisplayString());
Semantics\IteratorTests.cs (3)
43Assert.Equal("System.Int32", i.IteratorElementTypeWithAnnotations.ToTestDisplayString()); 49Assert.Equal("System.Int32", i.IteratorElementTypeWithAnnotations.ToTestDisplayString()); 92Assert.Equal("System.Int32", i.IteratorElementTypeWithAnnotations.ToTestDisplayString());
Semantics\LocalFunctionTests.cs (2)
2370Assert.Equal("System.Int32", local.IteratorElementTypeWithAnnotations.ToTestDisplayString()); 2376Assert.Equal("System.Int32", local.IteratorElementTypeWithAnnotations.ToTestDisplayString());
Semantics\NullableReferenceTypesTests.cs (103)
11199Assert.Equal(displayName, type.ToTestDisplayString(true)); 11302Assert.Equal(displayName, type.ToTestDisplayString(true)); 13851Assert.Equal("C<System.String? modopt(System.Runtime.CompilerServices.IsConst), System.String>", m1.OverriddenMethod.ReturnTypeWithAnnotations.ToTestDisplayString()); 13852Assert.Equal("C<System.String modopt(System.Runtime.CompilerServices.IsConst), System.String?>", m1.ReturnTypeWithAnnotations.ToTestDisplayString()); 59062Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59096Assert.Equal("System.String", symbol.TypeWithAnnotations.ToTestDisplayString()); 59124Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59156Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59185Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59218Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59250Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59283Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59317Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59344Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59374Assert.Equal("var?", type.ToTestDisplayString()); 59402Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59406Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59410Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 71320Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71323Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71356Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71359Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71397Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71400Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71434Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71437Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71471Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71474Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71506Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71509Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71539Assert.Equal("T", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71576Assert.Equal("T!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71579Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 81325Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 111590Assert.Equal("A1", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111592Assert.Equal("A2<System.Object>", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111634Assert.Equal("A1", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111635Assert.Equal("A1?", typeParameters[1].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111637Assert.Equal("A2<System.Object>", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111638Assert.Equal("A2<System.Object?>", typeParameters[1].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111778AssertEx.Equal(expectedTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 111843AssertEx.Equal(expectedConstraintTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 111896AssertEx.Equal(expectedConstraintTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 111939Assert.Equal("I<T>", constraintTypes[0].ToTestDisplayString(true)); 112670Assert.Equal(expected, constraintType.ToTestDisplayString()); 112759Assert.Equal(expected, constraintType.ToTestDisplayString()); 113249Assert.Equal("B[]", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113252Assert.Equal("C![]!", f2.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113298Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113327Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113364Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113395Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113436Assert.Equal("System.String!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113458Assert.Equal("System.String", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113488Assert.Equal("B[]!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113513Assert.Equal("B![]", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113598Assert.Equal("B<A>!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113623Assert.Equal("B<A!>", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113659Assert.Equal("var!", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113690Assert.Equal("var", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114314Assert.Equal("C!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114339Assert.Equal("C", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114372Assert.Equal("C.B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114400Assert.Equal("C.B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114433Assert.Equal("C.B<A>!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114461Assert.Equal("C.B<A!>", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114491Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114527Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114564Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114600Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114630Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114662Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114693Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114724Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114754Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114785Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114815Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114844Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 123979Assert.Equal(baseline[i].type, f.TypeWithAnnotations.ToTestDisplayString(true)); 137050Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137084Assert.Equal("System.IEquatable<T?>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137112Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137148Assert.Equal("System.IEquatable<System.String?>?", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137323Assert.Equal("System.IEquatable<T>?", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137348Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137378Assert.Equal("System.IEquatable<T!>?", t.ConstraintTypesNoUseSiteDiagnostics[i].ToTestDisplayString(true)); 137379Assert.Equal("System.IEquatable<System.String?>!", t.ConstraintTypesNoUseSiteDiagnostics[j].ToTestDisplayString(true)); 137427Assert.Equal("I1<System.String?, System.String>", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137433Assert.Equal("I1<System.String, System.String?>", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137439Assert.Equal("I1<System.String, System.String>?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137469Assert.Equal("I1<System.String?, System.String?>?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137510Assert.Equal("I1?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137511Assert.Equal("I2?", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 137551Assert.Equal("I1!", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137552Assert.Equal("I2!", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 137590Assert.Equal("I1?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137591Assert.Equal("I2?", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 137629Assert.Equal("I1!", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137630Assert.Equal("I2!", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 138828Assert.Equal("System.IEquatable<T>!", f.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138829Assert.Equal("System.IEquatable<T>", f.PartialImplementationPart.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138853Assert.Equal("System.IEquatable<T?>!", f.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138855Assert.Equal("System.IEquatable<T>", f.PartialImplementationPart.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Symbols\Metadata\PE\NoPia.cs (1)
1255Assert.Equal("System.Collections.Generic.List<I1>", varI7_Bar.ReturnTypeWithAnnotations.ToTestDisplayString());
Symbols\Source\EventTests.cs (4)
355Assert.Equal("System.Action<dynamic>", e1.AddMethod.ParameterTypesWithAnnotations[0].ToTestDisplayString()); 358Assert.Equal("System.Action<dynamic>", e1.RemoveMethod.ParameterTypesWithAnnotations[0].ToTestDisplayString()); 361Assert.Equal("System.Action<dynamic>", e2.AddMethod.ParameterTypesWithAnnotations[0].ToTestDisplayString()); 364Assert.Equal("System.Action<dynamic>", e2.RemoveMethod.ParameterTypesWithAnnotations[0].ToTestDisplayString());
Symbols\StaticAbstractMembersInInterfacesTests.cs (3)
27798Assert.Equal("System.Void", c3M02Remove.ReturnTypeWithAnnotations.ToTestDisplayString()); 27867Assert.Equal("System.Void", c4M02Add.ReturnTypeWithAnnotations.ToTestDisplayString()); 27880Assert.Equal("System.Void", c4M02Remove.ReturnTypeWithAnnotations.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
SymbolUtilities.cs (1)
113return types.Select(t => t.ToTestDisplayString()).ToArray();