41 references to FormatPrimitive
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (41)
SymbolDisplay\ObjectDisplayTests.vb (41)
16Assert.Equal("1", FormatPrimitive(CByte(1)))
17Assert.Equal("123", FormatPrimitive(CByte(123)))
18Assert.Equal("255", FormatPrimitive(Byte.MaxValue))
19Assert.Equal("1", FormatPrimitive(CSByte(1)))
20Assert.Equal("123", FormatPrimitive(CSByte(123)))
21Assert.Equal("-1", FormatPrimitive(CSByte(-1)))
22Assert.Equal("1", FormatPrimitive(CUShort(1)))
23Assert.Equal("123", FormatPrimitive(CUShort(123)))
24Assert.Equal("65535", FormatPrimitive(UShort.MaxValue))
25Assert.Equal("1", FormatPrimitive(CShort(1)))
26Assert.Equal("123", FormatPrimitive(CShort(123)))
27Assert.Equal("-1", FormatPrimitive(CShort(-1)))
28Assert.Equal("1", FormatPrimitive(CUInt(1)))
29Assert.Equal("123", FormatPrimitive(CUInt(123)))
30Assert.Equal("4294967295", FormatPrimitive(UInteger.MaxValue))
31Assert.Equal("1", FormatPrimitive(CInt(1)))
32Assert.Equal("123", FormatPrimitive(CInt(123)))
33Assert.Equal("-1", FormatPrimitive(CInt(-1)))
34Assert.Equal("1", FormatPrimitive(CULng(1)))
35Assert.Equal("123", FormatPrimitive(CULng(123)))
36Assert.Equal("18446744073709551615", FormatPrimitive(ULong.MaxValue))
37Assert.Equal("1", FormatPrimitive(CLng(1)))
38Assert.Equal("123", FormatPrimitive(CLng(123)))
39Assert.Equal("-1", FormatPrimitive(CLng(-1)))
82Assert.Equal("True", FormatPrimitive(True))
83Assert.Equal("False", FormatPrimitive(False))
88Assert.Equal("Nothing", FormatPrimitive(Nothing))
93Assert.Equal("2", FormatPrimitive(CType(2, Decimal)))
98Assert.Equal("2", FormatPrimitive(CType(2, Single)))
103Assert.Equal("2", FormatPrimitive(CType(2, Double)))
109Assert.Equal("""x""c", FormatPrimitive("x"c, quoteStrings:=True))
110Assert.Equal("x", FormatPrimitive("x"c, quoteStrings:=False))
147Assert.Equal("", FormatPrimitive("", quoteStrings:=False))
148Assert.Equal("a", FormatPrimitive("a", quoteStrings:=False))
149Assert.Equal("""", FormatPrimitive("""", quoteStrings:=False))
150Assert.Equal("""""", FormatPrimitive("", quoteStrings:=True))
151Assert.Equal("""""""""", FormatPrimitive("""", quoteStrings:=True))
233Assert.Equal("#1/31/2001 12:00:00 AM#", FormatPrimitive(dateValue))
237Assert.Equal("12.5", FormatPrimitive(decimalValue))
243Assert.Equal("12.5", FormatPrimitive(doubleValue))
249Assert.Equal("12.5", FormatPrimitive(singleValue))