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)
2154Assert.Equal("C.var", info.ElementTypeWithAnnotations.ToTestDisplayString()); 2165Assert.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)
11206Assert.Equal(displayName, type.ToTestDisplayString(true)); 11309Assert.Equal(displayName, type.ToTestDisplayString(true)); 13858Assert.Equal("C<System.String? modopt(System.Runtime.CompilerServices.IsConst), System.String>", m1.OverriddenMethod.ReturnTypeWithAnnotations.ToTestDisplayString()); 13859Assert.Equal("C<System.String modopt(System.Runtime.CompilerServices.IsConst), System.String?>", m1.ReturnTypeWithAnnotations.ToTestDisplayString()); 59102Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59136Assert.Equal("System.String", symbol.TypeWithAnnotations.ToTestDisplayString()); 59164Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59196Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59225Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59258Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59290Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59323Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59357Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59384Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59414Assert.Equal("var?", type.ToTestDisplayString()); 59442Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59446Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59450Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 71360Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71363Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71396Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71399Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71437Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71440Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71474Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71477Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71511Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71514Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71546Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71549Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71579Assert.Equal("T", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71616Assert.Equal("T!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71619Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 81362Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 111649Assert.Equal("A1", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111651Assert.Equal("A2<System.Object>", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111693Assert.Equal("A1", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111694Assert.Equal("A1?", typeParameters[1].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111696Assert.Equal("A2<System.Object>", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111697Assert.Equal("A2<System.Object?>", typeParameters[1].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111837AssertEx.Equal(expectedTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 111902AssertEx.Equal(expectedConstraintTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 111955AssertEx.Equal(expectedConstraintTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 111998Assert.Equal("I<T>", constraintTypes[0].ToTestDisplayString(true)); 112729Assert.Equal(expected, constraintType.ToTestDisplayString()); 112818Assert.Equal(expected, constraintType.ToTestDisplayString()); 113308Assert.Equal("B[]", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113311Assert.Equal("C![]!", f2.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113357Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113386Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113423Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113454Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113495Assert.Equal("System.String!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113517Assert.Equal("System.String", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113547Assert.Equal("B[]!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113572Assert.Equal("B![]", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113657Assert.Equal("B<A>!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113682Assert.Equal("B<A!>", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113718Assert.Equal("var!", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113749Assert.Equal("var", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114373Assert.Equal("C!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114398Assert.Equal("C", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114431Assert.Equal("C.B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114459Assert.Equal("C.B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114492Assert.Equal("C.B<A>!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114520Assert.Equal("C.B<A!>", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114550Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114586Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114623Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114659Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114689Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114721Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114752Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114783Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114813Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114844Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114874Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114903Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 124038Assert.Equal(baseline[i].type, f.TypeWithAnnotations.ToTestDisplayString(true)); 137109Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137143Assert.Equal("System.IEquatable<T?>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137171Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137207Assert.Equal("System.IEquatable<System.String?>?", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137382Assert.Equal("System.IEquatable<T>?", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137407Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137437Assert.Equal("System.IEquatable<T!>?", t.ConstraintTypesNoUseSiteDiagnostics[i].ToTestDisplayString(true)); 137438Assert.Equal("System.IEquatable<System.String?>!", t.ConstraintTypesNoUseSiteDiagnostics[j].ToTestDisplayString(true)); 137486Assert.Equal("I1<System.String?, System.String>", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137492Assert.Equal("I1<System.String, System.String?>", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137498Assert.Equal("I1<System.String, System.String>?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137528Assert.Equal("I1<System.String?, System.String?>?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137569Assert.Equal("I1?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137570Assert.Equal("I2?", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 137610Assert.Equal("I1!", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137611Assert.Equal("I2!", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 137649Assert.Equal("I1?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137650Assert.Equal("I2?", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 137688Assert.Equal("I1!", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137689Assert.Equal("I2!", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 138887Assert.Equal("System.IEquatable<T>!", f.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138888Assert.Equal("System.IEquatable<T>", f.PartialImplementationPart.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138912Assert.Equal("System.IEquatable<T?>!", f.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138914Assert.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)
27720Assert.Equal("System.Void", c3M02Remove.ReturnTypeWithAnnotations.ToTestDisplayString()); 27789Assert.Equal("System.Void", c4M02Add.ReturnTypeWithAnnotations.ToTestDisplayString()); 27802Assert.Equal("System.Void", c4M02Remove.ReturnTypeWithAnnotations.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
SymbolUtilities.cs (1)
113return types.Select(t => t.ToTestDisplayString()).ToArray();