67 references to GetTypeName
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ResultProvider.UnitTests (67)
TypeNameFormatterTests.vb (67)
20Assert.Equal("Object", GetType(Object).GetTypeName()) 21Assert.Equal("Boolean", GetType(Boolean).GetTypeName()) 22Assert.Equal("Char", GetType(Char).GetTypeName()) 23Assert.Equal("SByte", GetType(SByte).GetTypeName()) 24Assert.Equal("Byte", GetType(Byte).GetTypeName()) 25Assert.Equal("Short", GetType(Short).GetTypeName()) 26Assert.Equal("UShort", GetType(UShort).GetTypeName()) 27Assert.Equal("Integer", GetType(Integer).GetTypeName()) 28Assert.Equal("UInteger", GetType(UInteger).GetTypeName()) 29Assert.Equal("Long", GetType(Long).GetTypeName()) 30Assert.Equal("ULong", GetType(ULong).GetTypeName()) 31Assert.Equal("Single", GetType(Single).GetTypeName()) 32Assert.Equal("Double", GetType(Double).GetTypeName()) 33Assert.Equal("Decimal", GetType(Decimal).GetTypeName()) 34Assert.Equal("String", GetType(String).GetTypeName()) 35Assert.Equal("Date", GetType(Date).GetTypeName()) 63Assert.Equal("A", assembly.GetType("A").GetTypeName()) 64Assert.Equal("A.B", assembly.GetType("A+B").GetTypeName()) 65Assert.Equal("N.A", assembly.GetType("N.A").GetTypeName()) 66Assert.Equal("N.A.B", assembly.GetType("N.A+B").GetTypeName()) 67Assert.Equal("N.G1(Of Integer).G2(Of Single).G3(Of Double)", assembly.GetType("N.G1`1+G2`1+G3`1").MakeGenericType(GetType(Integer), GetType(Single), GetType(Double)).GetTypeName()) 68Assert.Equal("N.G1(Of Integer).G2(Of Single).G4(Of Double, UShort)", assembly.GetType("N.G1`1+G2`1+G4`2").MakeGenericType(GetType(Integer), GetType(Single), GetType(Double), GetType(UShort)).GetTypeName()) 95Assert.Equal("N.C(Of T, U)", typeC.GetTypeName()) 96Assert.Equal("N.C(Of Integer, String)", typeCIntString.GetTypeName()) 97Assert.Equal("N.C(Of A, A.B)", typeC.MakeGenericType(typeA, typeB).GetTypeName()) 98Assert.Equal("N.C(Of Integer, String).D(Of A, A.B)", typeD.MakeGenericType(typeInt, typeString, typeA, typeB).GetTypeName()) 99Assert.Equal("N.C(Of A, N.C(Of Integer, String)).D(Of N.C(Of Integer, String), A.B)", typeD.MakeGenericType(typeA, typeCIntString, typeCIntString, typeB).GetTypeName()) 114Assert.Equal("A(Of Integer).B", typeB.MakeGenericType(GetType(Integer)).GetTypeName()) 119Assert.Equal("Integer?", GetType(Integer?).GetTypeName()) 120Assert.Equal("Boolean?", GetType(Boolean?).GetTypeName()) 143Assert.Equal("N.C?", typeNullable.MakeGenericType(typeC).GetTypeName()) 144Assert.Equal("N.A(Of N.C)?", typeNullable.MakeGenericType(typeA.MakeGenericType(typeC)).GetTypeName()) 145Assert.Equal("N.A(Of N.C).B(Of N.C)?", typeNullable.MakeGenericType(typeB.MakeGenericType(typeC, typeC)).GetTypeName()) 150Assert.Equal("Integer()", GetType(Integer()).GetTypeName()) 151Assert.Equal("Integer(,)", GetType(Integer(,)).GetTypeName()) 152Assert.Equal("Integer()(,)", GetType(Integer()(,)).GetTypeName()) 153Assert.Equal("Integer(,)()", GetType(Integer(,)()).GetTypeName()) 176Assert.Equal("N.C()", typeC.MakeArrayType().GetTypeName()) 177Assert.Equal("N.C()", typeC.MakeArrayType(1).GetTypeName()) ' NOTE: Multi-dimensional array that happens to exactly one dimension. 178Assert.Equal("N.A(Of N.C)(,)", typeA.MakeGenericType(typeC).MakeArrayType(2).GetTypeName()) 179Assert.Equal("N.A(Of N.C()).B(Of N.C)(,,)", typeB.MakeGenericType(typeC.MakeArrayType(), typeC).MakeArrayType(3).GetTypeName()) 186Assert.Equal("Integer(,,)", instance.GetType().GetTypeName()) 187Assert.Equal("Integer()(,,)", instance.GetType().MakeArrayType().GetTypeName()) 192Assert.Equal("Integer*", GetType(Integer).MakePointerType().GetTypeName()) 193Assert.Equal("Integer**", GetType(Integer).MakePointerType().MakePointerType().GetTypeName()) 194Assert.Equal("Integer*()", GetType(Integer).MakePointerType().MakeArrayType().GetTypeName()) 215Assert.Equal("N.C*", typeC.MakePointerType().GetTypeName()) 216Assert.Equal("N.A(Of N.C)*", typeA.MakeGenericType(typeC).MakePointerType().GetTypeName()) 217Assert.Equal("N.A(Of N.C).B(Of N.C)*", typeB.MakeGenericType(typeC, typeC).MakePointerType().GetTypeName()) 222Assert.Equal("System.Void", GetType(Void).GetTypeName()) 223Assert.Equal("System.Void*", GetType(Void).MakePointerType().GetTypeName()) 256Assert.Equal("Object", objectType.GetTypeName(escapeKeywordIdentifiers:=False)) 257Assert.Equal("Object.True", trueType.GetTypeName(escapeKeywordIdentifiers:=False)) 258Assert.Equal("Return.False.Nothing", nothingType.GetTypeName(escapeKeywordIdentifiers:=False)) 259Assert.Equal("Return.From(Of Async)", fromType.GetTypeName(escapeKeywordIdentifiers:=False)) 260Assert.Equal("Return.From(Of Return.False.Nothing)", constructedYieldType.GetTypeName(escapeKeywordIdentifiers:=False)) 261Assert.Equal("Return.From(Of Return.False.Nothing).Await", constructedAwaitType.GetTypeName(escapeKeywordIdentifiers:=False)) 263Assert.Equal("[Object]", objectType.GetTypeName(escapeKeywordIdentifiers:=True)) 264Assert.Equal("[Object].[True]", trueType.GetTypeName(escapeKeywordIdentifiers:=True)) 265Assert.Equal("[Return].[False].[Nothing]", nothingType.GetTypeName(escapeKeywordIdentifiers:=True)) 266Assert.Equal("[Return].[From](Of [Async])", fromType.GetTypeName(escapeKeywordIdentifiers:=True)) 267Assert.Equal("[Return].[From](Of [Return].[False].[Nothing])", constructedYieldType.GetTypeName(escapeKeywordIdentifiers:=True)) 268Assert.Equal("[Return].[From](Of [Return].[False].[Nothing]).[Await]", constructedAwaitType.GetTypeName(escapeKeywordIdentifiers:=True)) 273Assert.Equal("Object", GetType(Object).GetTypeName(MakeCustomTypeInfo(True))) 274Assert.Equal("Object()", GetType(Object()).GetTypeName(MakeCustomTypeInfo(False, True))) 280Assert.Equal("Object", GetType(Object).GetTypeName(typeInfo)) 281Assert.Equal("Object()", GetType(Object()).GetTypeName(typeInfo))