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)
11577Assert.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)
4180AssertEx.Equal("System.String?", m.GlobalNamespace.GetMember<MethodSymbol>("Extensions.<>E__0.<Extension>$").Parameters[0].TypeWithAnnotations.ToTestDisplayString()); 4181AssertEx.Equal("System.String?", m.GlobalNamespace.GetMember<MethodSymbol>("Extensions.<>E__1.<Extension>$").Parameters[0].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)
2378Assert.Equal("System.Int32", local.IteratorElementTypeWithAnnotations.ToTestDisplayString()); 2384Assert.Equal("System.Int32", local.IteratorElementTypeWithAnnotations.ToTestDisplayString());
Semantics\NullableReferenceTypesTests.cs (103)
11202Assert.Equal(displayName, type.ToTestDisplayString(true)); 11305Assert.Equal(displayName, type.ToTestDisplayString(true)); 13854Assert.Equal("C<System.String? modopt(System.Runtime.CompilerServices.IsConst), System.String>", m1.OverriddenMethod.ReturnTypeWithAnnotations.ToTestDisplayString()); 13855Assert.Equal("C<System.String modopt(System.Runtime.CompilerServices.IsConst), System.String?>", m1.ReturnTypeWithAnnotations.ToTestDisplayString()); 59061Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59095Assert.Equal("System.String", symbol.TypeWithAnnotations.ToTestDisplayString()); 59123Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59155Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59184Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59217Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59249Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59282Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59316Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59343Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59373Assert.Equal("var?", type.ToTestDisplayString()); 59401Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59405Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59409Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 71296Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71299Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71332Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71335Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71373Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71376Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71410Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71413Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71447Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71450Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71482Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71485Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71515Assert.Equal("T", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71552Assert.Equal("T!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71555Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 81303Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 111568Assert.Equal("A1", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111570Assert.Equal("A2<System.Object>", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111612Assert.Equal("A1", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111613Assert.Equal("A1?", typeParameters[1].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111615Assert.Equal("A2<System.Object>", typeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111616Assert.Equal("A2<System.Object?>", typeParameters[1].ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 111756AssertEx.Equal(expectedTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 111821AssertEx.Equal(expectedConstraintTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 111874AssertEx.Equal(expectedConstraintTypes, constraintTypes.SelectAsArray(t => t.ToTestDisplayString(true))); 111917Assert.Equal("I<T>", constraintTypes[0].ToTestDisplayString(true)); 112648Assert.Equal(expected, constraintType.ToTestDisplayString()); 112737Assert.Equal(expected, constraintType.ToTestDisplayString()); 113227Assert.Equal("B[]", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113230Assert.Equal("C![]!", f2.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113276Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113305Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113342Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113373Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113414Assert.Equal("System.String!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113436Assert.Equal("System.String", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113466Assert.Equal("B[]!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113491Assert.Equal("B![]", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113576Assert.Equal("B<A>!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113601Assert.Equal("B<A!>", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113637Assert.Equal("var!", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113668Assert.Equal("var", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114292Assert.Equal("C!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114317Assert.Equal("C", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114350Assert.Equal("C.B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114378Assert.Equal("C.B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114411Assert.Equal("C.B<A>!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114439Assert.Equal("C.B<A!>", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114469Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114505Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114542Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114578Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114608Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114640Assert.Equal("B", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114671Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114702Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114732Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114763Assert.Equal("B?", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114793Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 114822Assert.Equal("B!", f1.TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 123957Assert.Equal(baseline[i].type, f.TypeWithAnnotations.ToTestDisplayString(true)); 137031Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137065Assert.Equal("System.IEquatable<T?>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137093Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137129Assert.Equal("System.IEquatable<System.String?>?", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137304Assert.Equal("System.IEquatable<T>?", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137329Assert.Equal("System.IEquatable<T>!", t.ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 137359Assert.Equal("System.IEquatable<T!>?", t.ConstraintTypesNoUseSiteDiagnostics[i].ToTestDisplayString(true)); 137360Assert.Equal("System.IEquatable<System.String?>!", t.ConstraintTypesNoUseSiteDiagnostics[j].ToTestDisplayString(true)); 137408Assert.Equal("I1<System.String?, System.String>", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137414Assert.Equal("I1<System.String, System.String?>", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137420Assert.Equal("I1<System.String, System.String>?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137450Assert.Equal("I1<System.String?, System.String?>?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137491Assert.Equal("I1?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137492Assert.Equal("I2?", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 137532Assert.Equal("I1!", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137533Assert.Equal("I2!", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 137571Assert.Equal("I1?", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137572Assert.Equal("I2?", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 137610Assert.Equal("I1!", t.ConstraintTypesNoUseSiteDiagnostics[0].ToTestDisplayString(true)); 137611Assert.Equal("I2!", t.ConstraintTypesNoUseSiteDiagnostics[1].ToTestDisplayString(true)); 138809Assert.Equal("System.IEquatable<T>!", f.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138810Assert.Equal("System.IEquatable<T>", f.PartialImplementationPart.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138834Assert.Equal("System.IEquatable<T?>!", f.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138836Assert.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();