3 overrides of FormatObject
Microsoft.CodeAnalysis.CSharp.Scripting (1)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.VisualBasic.Scripting (1)
68 references to FormatObject
Microsoft.CodeAnalysis.CSharp.Scripting (1)
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (19)
PrintOptionsTests.cs (19)
21Assert.Throws<ArgumentNullException>(() => s_formatter.FormatObject("hello", options: null));
66Assert.Equal("PrintOptions", s_formatter.FormatObject(options, options));
69Assert.Equal("PrintOptions { Ellipsis=\"...\", EscapeNonPrintableCharacters=true, MaximumOutputLength=1024, MemberDisplayFormat=SingleLine, NumberRadix=10 }", s_formatter.FormatObject(options, options));
82", s_formatter.FormatObject(options, options));
91Assert.Equal(@"""\t""", s_formatter.FormatObject("\t", options));
92Assert.Equal(@"'\t'", s_formatter.FormatObject('\t', options));
95Assert.Equal("\"\t\"", s_formatter.FormatObject("\t", options));
96Assert.Equal("'\t'", s_formatter.FormatObject('\t', options));
105Assert.Equal("1...", s_formatter.FormatObject(123456, options));
108Assert.Equal("12...", s_formatter.FormatObject(123456, options));
111Assert.Equal("123...", s_formatter.FormatObject(123456, options));
114Assert.Equal("1234...", s_formatter.FormatObject(123456, options));
117Assert.Equal("12345...", s_formatter.FormatObject(123456, options));
120Assert.Equal("123456", s_formatter.FormatObject(123456, options));
123Assert.Equal("123456", s_formatter.FormatObject(123456, options));
133Assert.Equal("1.", s_formatter.FormatObject(123456, options));
136Assert.Equal("1..", s_formatter.FormatObject(123456, options));
139Assert.Equal("1", s_formatter.FormatObject(123456, options));
142Assert.Equal("1", s_formatter.FormatObject(123456, options));
Microsoft.CodeAnalysis.Scripting (3)
Microsoft.CodeAnalysis.VisualBasic.Scripting (1)
Microsoft.CodeAnalysis.VisualBasic.Scripting.Desktop.UnitTests (6)
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (31)
PrintOptionsTests.vb (25)
18Assert.Throws(Of ArgumentNullException)(Sub() s_formatter.FormatObject("hello", options:=Nothing))
59Assert.Equal("10", s_formatter.FormatObject(10, options))
60Assert.Equal("Integer(10) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }", s_formatter.FormatObject(array, options))
61Assert.Equal("ChrW(16)", s_formatter.FormatObject(ChrW(&H10), options))
64Assert.Equal("&H0000000A", s_formatter.FormatObject(10, options))
65Assert.Equal("Integer(&H0000000A) { &H00000000, &H00000000, &H00000000, &H00000000, &H00000000, &H00000000, &H00000000, &H00000000, &H00000000, &H00000000 }", s_formatter.FormatObject(array, options))
66Assert.Equal("ChrW(&H10)", s_formatter.FormatObject(ChrW(&H10), options))
74Assert.Equal("PrintOptions", s_formatter.FormatObject(options, options))
77Assert.Equal("PrintOptions { Ellipsis=""..."", EscapeNonPrintableCharacters=True, MaximumOutputLength=1024, MemberDisplayFormat=SingleLine, NumberRadix=10 }", s_formatter.FormatObject(options, options))
90", s_formatter.FormatObject(options, options))
98Assert.Equal("vbTab", s_formatter.FormatObject(vbTab, options))
99Assert.Equal("vbTab", s_formatter.FormatObject(vbTab(0), options))
102Assert.Equal("""" + vbTab + """", s_formatter.FormatObject(vbTab, options))
103Assert.Equal("""" + vbTab + """c", s_formatter.FormatObject(vbTab(0), options))
111Assert.Equal("1...", s_formatter.FormatObject(123456, options))
114Assert.Equal("12...", s_formatter.FormatObject(123456, options))
117Assert.Equal("123...", s_formatter.FormatObject(123456, options))
120Assert.Equal("1234...", s_formatter.FormatObject(123456, options))
123Assert.Equal("12345...", s_formatter.FormatObject(123456, options))
126Assert.Equal("123456", s_formatter.FormatObject(123456, options))
129Assert.Equal("123456", s_formatter.FormatObject(123456, options))
138Assert.Equal("1.", s_formatter.FormatObject(123456, options))
141Assert.Equal("1..", s_formatter.FormatObject(123456, options))
144Assert.Equal("1", s_formatter.FormatObject(123456, options))
147Assert.Equal("1", s_formatter.FormatObject(123456, options))