144 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())); 11216Assert.Equal(new[] { "System.Int32", "System.Int32" }, m1Tuple.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Select(t => t.ToTestDisplayString())); 22316Assert.Equal("(System.Int32, System.Int32)[missing]", methodM.ReturnTypeWithAnnotations.ToTestDisplayString()); 22356Assert.Equal("(System.Int32 Item1, System.Int32 Bob)[missing]", methodM.ReturnTypeWithAnnotations.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (17)
Attributes\AttributeTests_Dynamic.cs (1)
538Assert.Equal("System.Boolean[]", dynamicAttribute.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString());
Attributes\AttributeTests_NativeInteger.cs (1)
1497Assert.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());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (109)
Semantics\ForEachTests.cs (2)
1637Assert.Equal("C.var", info.ElementTypeWithAnnotations.ToTestDisplayString()); 1648Assert.Equal("C.var", boundNode.IterationVariables.Single().TypeWithAnnotations.ToTestDisplayString());
Semantics\IteratorTests.cs (2)
39Assert.Equal("System.Int32", i.IteratorElementTypeWithAnnotations.ToTestDisplayString()); 44Assert.Equal("System.Int32", i.IteratorElementTypeWithAnnotations.ToTestDisplayString());
Semantics\LocalFunctionTests.cs (2)
2377Assert.Equal("System.Int32", local.IteratorElementTypeWithAnnotations.ToTestDisplayString()); 2382Assert.Equal("System.Int32", local.IteratorElementTypeWithAnnotations.ToTestDisplayString());
Semantics\NullableReferenceTypesTests.cs (103)
11190Assert.Equal(displayName, type.ToTestDisplayString(true)); 11293Assert.Equal(displayName, type.ToTestDisplayString(true)); 13842Assert.Equal("C<System.String? modopt(System.Runtime.CompilerServices.IsConst), System.String>", m1.OverriddenMethod.ReturnTypeWithAnnotations.ToTestDisplayString()); 13843Assert.Equal("C<System.String modopt(System.Runtime.CompilerServices.IsConst), System.String?>", m1.ReturnTypeWithAnnotations.ToTestDisplayString()); 56565Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56599Assert.Equal("System.String", symbol.TypeWithAnnotations.ToTestDisplayString()); 56627Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56659Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56688Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56721Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56753Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56786Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56820Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56847Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56877Assert.Equal("var?", type.ToTestDisplayString()); 56905Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56909Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 56913Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 67837Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 67840Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 67873Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 67876Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 67914Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 67917Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 67951Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 67954Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 67988Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 67991Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 68023Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 68026Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 68056Assert.Equal("T", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 68093Assert.Equal("T!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 68096Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 77614Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 107798Assert.Equal("A1", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 107800Assert.Equal("A2<System.Object>", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 107842Assert.Equal("A1", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 107843Assert.Equal("A1?", typeParameters[1].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 107845Assert.Equal("A2<System.Object>", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 107846Assert.Equal("A2<System.Object?>", typeParameters[1].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 107986AssertEx.Equal(expectedTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 108051AssertEx.Equal(expectedConstraintTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 108104AssertEx.Equal(expectedConstraintTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 108147Assert.Equal("I<T>", constraintTypes[0].ToTestDisplayString(true)); 108878Assert.Equal(expected, constraintType.ToTestDisplayString()); 108967Assert.Equal(expected, constraintType.ToTestDisplayString()); 109457Assert.Equal("B[]", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109460Assert.Equal("C![]!", f2.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109506Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109535Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109572Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109603Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109644Assert.Equal("System.String!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109666Assert.Equal("System.String", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109696Assert.Equal("B[]!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109721Assert.Equal("B![]", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109806Assert.Equal("B<A>!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109831Assert.Equal("B<A!>", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109867Assert.Equal("var!", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 109898Assert.Equal("var", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110522Assert.Equal("C!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110547Assert.Equal("C", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110580Assert.Equal("C.B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110608Assert.Equal("C.B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110641Assert.Equal("C.B<A>!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110669Assert.Equal("C.B<A!>", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110699Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110735Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110772Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110808Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110838Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110870Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110901Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110932Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110962Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 110993Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 111023Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 111052Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 120187Assert.Equal(baseline[i].type, f.TypeWithAnnotations.ToTestDisplayString(true)); 133261Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 133295Assert.Equal("System.IEquatable<T?>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 133323Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 133359Assert.Equal("System.IEquatable<System.String?>?", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 133534Assert.Equal("System.IEquatable<T>?", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 133559Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 133589Assert.Equal("System.IEquatable<T!>?", t.ConstraintTypesNoUseSiteDiagnostics[i].ToTestDisplayString(true)); 133590Assert.Equal("System.IEquatable<System.String?>!", t.ConstraintTypesNoUseSiteDiagnostics[j].ToTestDisplayString(true)); 133638Assert.Equal("I1<System.String?, System.String>", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 133644Assert.Equal("I1<System.String, System.String?>", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 133650Assert.Equal("I1<System.String, System.String>?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 133680Assert.Equal("I1<System.String?, System.String?>?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 133721Assert.Equal("I1?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 133722Assert.Equal("I2?", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 133762Assert.Equal("I1!", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 133763Assert.Equal("I2!", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 133801Assert.Equal("I1?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 133802Assert.Equal("I2?", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 133840Assert.Equal("I1!", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 133841Assert.Equal("I2!", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 134509Assert.Equal("System.IEquatable<T>!", f.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 134510Assert.Equal("System.IEquatable<T>", f.PartialImplementationPart.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 134534Assert.Equal("System.IEquatable<T?>!", f.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 134536Assert.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)
27284Assert.Equal("System.Void", c3M02Remove.ReturnTypeWithAnnotations.ToTestDisplayString()); 27353Assert.Equal("System.Void", c4M02Add.ReturnTypeWithAnnotations.ToTestDisplayString()); 27366Assert.Equal("System.Void", c4M02Remove.ReturnTypeWithAnnotations.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
SymbolUtilities.cs (1)
113return types.Select(t => t.ToTestDisplayString()).ToArray();