179 instantiations of SpanResult
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (179)
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.cs (179)
89
new
SpanResult
(5, 4, 9, 5, "public static void Main()"),
90
new
SpanResult
(7, 8, 7, 31, "Console.WriteLine(123)"),
91
new
SpanResult
(8, 8, 8, 31, "Console.WriteLine(123)"));
94
new
SpanResult
(11, 4, 11, 32, "public static int Fred => 3"),
95
new
SpanResult
(11, 30, 11, 31, "3"));
98
new
SpanResult
(13, 4, 13, 41, "public static int Barney(int x) => x"),
99
new
SpanResult
(13, 39, 13, 40, "x"));
102
new
SpanResult
(17, 8, 17, 26, "get { return 12; }"),
103
new
SpanResult
(17, 14, 17, 24, "return 12"));
106
new
SpanResult
(18, 8, 18, 15, "set { }"));
109
new
SpanResult
(21, 4, 21, 36, "public static int Betty { get; }"),
110
new
SpanResult
(21, 30, 21, 34, "get"));
113
new
SpanResult
(23, 4, 23, 43, "public static int Pebbles { get; set; }"),
114
new
SpanResult
(23, 32, 23, 36, "get"));
117
new
SpanResult
(23, 4, 23, 43, "public static int Pebbles { get; set; }"),
118
new
SpanResult
(23, 37, 23, 41, "set"));
233
new
SpanResult
(5, 4, 89, 5, "public static void Main()"),
234
new
SpanResult
(7, 8, 7, 19, "int z = 11"),
235
new
SpanResult
(8, 8, 8, 23, "int x = z + 10"),
236
new
SpanResult
(12, 16, 12, 22, "break"),
237
new
SpanResult
(14, 16, 14, 22, "break"),
238
new
SpanResult
(16, 16, 16, 22, "break"),
239
new
SpanResult
(18, 16, 18, 22, "break"),
240
new
SpanResult
(9, 16, 9, 17, "z"),
241
new
SpanResult
(23, 12, 23, 16, "x++"),
242
new
SpanResult
(27, 12, 27, 16, "x--"),
243
new
SpanResult
(21, 12, 21, 18, "x > 10"),
244
new
SpanResult
(30, 17, 30, 22, "y = 0"),
245
new
SpanResult
(30, 32, 30, 35, "y++"),
246
new
SpanResult
(34, 16, 34, 20, "x++"),
247
new
SpanResult
(35, 16, 35, 25, "continue"),
248
new
SpanResult
(38, 16, 38, 22, "break"),
249
new
SpanResult
(32, 16, 32, 22, "y < 30"),
250
new
SpanResult
(41, 8, 41, 43, "int[] a = new int[] { 1, 2, 3, 4 }"),
251
new
SpanResult
(44, 12, 44, 16, "x++"),
252
new
SpanResult
(42, 26, 42, 27, "a"),
253
new
SpanResult
(49, 12, 49, 16, "x++"),
254
new
SpanResult
(47, 15, 47, 22, "x < 100"),
255
new
SpanResult
(54, 12, 54, 16, "x++"),
256
new
SpanResult
(57, 16, 57, 45, "throw new System.Exception()"),
257
new
SpanResult
(55, 16, 55, 22, "x > 10"),
258
new
SpanResult
(59, 12, 59, 16, "x++"),
259
new
SpanResult
(63, 12, 63, 16, "x++"),
260
new
SpanResult
(67, 12, 67, 16, "x++"),
261
new
SpanResult
(72, 12, 72, 13, ";"),
262
new
SpanResult
(70, 14, 70, 26, "new object()"),
263
new
SpanResult
(75, 8, 75, 29, "Console.WriteLine(x)"),
264
new
SpanResult
(81, 16, 81, 17, ";"),
265
new
SpanResult
(79, 19, 79, 51, "(System.IDisposable)new object()"),
266
new
SpanResult
(88, 8, 88, 15, "return"));
353
new
SpanResult
(8, 4, 11, 5, "public static void Main()"),
354
new
SpanResult
(10, 8, 10, 15, "Fred()"));
357
new
SpanResult
(14, 4, 16, 5, "static void Fred()"));
360
new
SpanResult
(18, 4, 21, 5, "static C()"),
361
new
SpanResult
(20, 8, 20, 15, "x = 12"));
364
new
SpanResult
(24, 4, 26, 5, "public C()"));
367
new
SpanResult
(31, 8, 31, 26, "get {"),
368
new
SpanResult
(31, 14, 31, 24, "return 12"));
371
new
SpanResult
(35, 4, 35, 20, "int Betty"),
372
new
SpanResult
(35, 17, 35, 19, "13"));
375
new
SpanResult
(38, 4, 41, 5, "int Pebbles()"),
376
new
SpanResult
(40, 8, 40, 17, "return 3"));
379
new
SpanResult
(44, 4, 47, 5, "ref int BamBam"),
380
new
SpanResult
(46, 8, 46, 21, "return ref x"));
383
new
SpanResult
(50, 4, 52, 5, "C(int x)"));
386
new
SpanResult
(55, 4, 55, 28, "public int Barney"),
387
new
SpanResult
(55, 25, 55, 27, "13"));
390
new
SpanResult
(58, 4, 61, 5, "public static C operator +"),
391
new
SpanResult
(60, 8, 60, 17, "return a"));
442
new
SpanResult
(5, 4, 11, 5, "public static void Main()"),
443
new
SpanResult
(7, 8, 7, 34, "Student s = new Student()"),
444
new
SpanResult
(8, 8, 8, 24, "s.Name = \"Bozo\""),
445
new
SpanResult
(9, 8, 9, 20, "s.GPA = 2.3"),
446
new
SpanResult
(10, 8, 10, 19, "Operate(s)"));
449
new
SpanResult
(13, 4, 28, 5, "static string Operate(Person p)"),
450
new
SpanResult
(17, 27, 17, 43, "when s.GPA > 3.5"),
451
new
SpanResult
(19, 27, 19, 45, "when (s.GPA < 2.0)"),
452
new
SpanResult
(18, 16, 18, 56, "return $\"Student {s.Name} ({s.GPA:N1})\""),
453
new
SpanResult
(20, 16, 20, 64, "return $\"Failing Student {s.Name} ({s.GPA:N1})\""),
454
new
SpanResult
(22, 16, 22, 56, "return $\"Student {s.Name} ({s.GPA:N1})\""),
455
new
SpanResult
(24, 16, 24, 58, "return $\"Teacher {t.Name} of {t.Subject}\""),
456
new
SpanResult
(26, 16, 26, 42, "return $\"Person {p.Name}\""),
457
new
SpanResult
(15, 16, 15, 17, "p"));
499
new
SpanResult
(10, 4, 23, 5, "static string Method1(int i, bool b1, bool b2)"),
500
new
SpanResult
(14, 23, 14, 30, "when b1:"),
501
new
SpanResult
(16, 23, 16, 30, "when b2:"),
502
new
SpanResult
(15, 16, 15, 28, @"return ""b1"";"),
503
new
SpanResult
(17, 16, 17, 28, @"return ""b2"";"),
504
new
SpanResult
(19, 16, 19, 27, @"return ""1"";"),
505
new
SpanResult
(21, 16, 21, 33, @"return ""default"";"),
506
new
SpanResult
(12, 16, 12, 17, "i"));
538
new
SpanResult
(5, 4, 8, 5, "public static void Main()"),
539
new
SpanResult
(7, 8, 7, 29, "var (x, y) = new C()"));
569
new
SpanResult
(5, 4, 12, 5, "public static void Main()"),
570
new
SpanResult
(7, 8, 7, 21, "C[] a = null"),
571
new
SpanResult
(11, 12, 11, 13, ";"),
572
new
SpanResult
(10, 15, 10, 16, "a")
609
new
SpanResult
(5, 4, 12, 5, "public static void Main()"),
610
new
SpanResult
(7, 8, 7, 21, "C[] a = null"),
611
new
SpanResult
(11, 12, 11, 13, ";"),
612
new
SpanResult
(10, 15, 10, 16, "a")
677
new
SpanResult
(5, 4, 8, 5, "public static void Main()"),
678
new
SpanResult
(7, 8, 7, 19, "TestMain()"));
681
new
SpanResult
(10, 4, 13, 5, "static void TestMain()"),
682
new
SpanResult
(12, 8, 12, 26, "C local = new C()"),
683
new
SpanResult
(12, 27, 12, 47, "local = new C(1, 2)"));
686
new
SpanResult
(15, 4, 15, 28, "static int Init() => 33"),
687
new
SpanResult
(15, 25, 15, 27, "33"));
690
new
SpanResult
(17, 4, 20, 5, "C()"),
691
new
SpanResult
(27, 13, 27, 19, "Init()"),
692
new
SpanResult
(28, 13, 28, 24, "Init() + 12"),
693
new
SpanResult
(44, 25, 44, 27, "15"),
694
new
SpanResult
(19, 8, 19, 16, "_z = 12"));
697
new
SpanResult
(22, 4, 25, 5, "static C()"),
698
new
SpanResult
(30, 21, 30, 27, "Init()"),
699
new
SpanResult
(31, 21, 31, 33, "Init() + 153"),
700
new
SpanResult
(45, 32, 45, 35, "255"),
701
new
SpanResult
(24, 8, 24, 18, "s_z = 123"));
704
new
SpanResult
(34, 4, 37, 5, "C(int x)"),
705
new
SpanResult
(27, 13, 27, 19, "Init()"),
706
new
SpanResult
(28, 13, 28, 24, "Init() + 12"),
707
new
SpanResult
(44, 25, 44, 27, "15"),
708
new
SpanResult
(36, 8, 36, 15, "_z = x"));
711
new
SpanResult
(39, 4, 42, 5, "C(int a, int b)"),
712
new
SpanResult
(27, 13, 27, 19, "Init()"),
713
new
SpanResult
(28, 13, 28, 24, "Init() + 12"),
714
new
SpanResult
(44, 25, 44, 27, "15"),
715
new
SpanResult
(41, 8, 41, 19, "_z = a + b"));
758
new
SpanResult
(5, 4, 8, 5, "public static void Main()"),
759
new
SpanResult
(7, 8, 7, 19, "TestMain()"));
762
new
SpanResult
(10, 4, 13, 5, "static void TestMain()"),
763
new
SpanResult
(12, 8, 12, 26, "C local = new C()"));
766
new
SpanResult
(15, 4, 15, 28, "static int Init() => 33"),
767
new
SpanResult
(15, 25, 15, 27, "33"));
770
new
SpanResult
(17, 13, 17, 19, "Init()"),
771
new
SpanResult
(18, 13, 18, 24, "Init() + 12"),
772
new
SpanResult
(23, 25, 23, 27, "15"));
775
new
SpanResult
(19, 21, 19, 27, "Init()"),
776
new
SpanResult
(20, 21, 20, 33, "Init() + 153"),
777
new
SpanResult
(21, 21, 21, 24, "144"),
778
new
SpanResult
(24, 32, 24, 35, "255"));
839
new
SpanResult
(5, 4, 8, 5, "public static void Main()"),
840
new
SpanResult
(7, 8, 7, 19, "TestMain()"));
843
new
SpanResult
(10, 4, 16, 5, "static void TestMain()"),
844
new
SpanResult
(12, 8, 12, 32, "int y = s_c._function()"),
845
new
SpanResult
(13, 8, 13, 22, "D d = new D()"),
846
new
SpanResult
(14, 8, 14, 33, "int z = d._c._function()"),
847
new
SpanResult
(15, 8, 15, 35, "int zz = D.s_c._function()"));
850
new
SpanResult
(18, 4, 21, 5, "public C(Func<int> f)"),
851
new
SpanResult
(20, 8, 20, 22, "_function = f"));
854
new
SpanResult
(23, 31, 23, 34, "115"),
855
new
SpanResult
(23, 19, 23, 35, "new C(() => 115)"));
858
new
SpanResult
(29, 30, 29, 33, "120"),
859
new
SpanResult
(31, 31, 31, 34, "130"),
860
new
SpanResult
(29, 18, 29, 34, "new C(() => 120)"),
861
new
SpanResult
(31, 19, 31, 35, "new C(() => 130)"));
864
new
SpanResult
(30, 38, 30, 41, "144"),
865
new
SpanResult
(32, 39, 32, 42, "156"),
866
new
SpanResult
(30, 26, 30, 42, "new C(() => 144)"),
867
new
SpanResult
(32, 27, 32, 43, "new C(() => 156"));
870
new
SpanResult
(41, 38, 41, 42, "1444"),
871
new
SpanResult
(42, 41, 42, 53, "return 1567"),
872
new
SpanResult
(41, 26, 41, 43, "new C(() => 1444)"),
873
new
SpanResult
(42, 27, 42, 56, "new C(() => { return 1567; })"));
933
new
SpanResult
(5, 4, 8, 5, "public static void Main()"),
934
new
SpanResult
(7, 8, 7, 19, "TestMain()"));
937
new
SpanResult
(10, 4, 13, 5, "static void TestMain()"),
938
new
SpanResult
(12, 8, 12, 21, "new D().M1()"));
941
new
SpanResult
(18, 4, 41, 5, "public void M1()"),
942
new
SpanResult
(20, 8, 20, 13, "L1()"),
943
new
SpanResult
(24, 22, 24, 23, "1"),
944
new
SpanResult
(23, 12, 25, 14, "var f = new Func<int>"),
945
new
SpanResult
(27, 12, 27, 16, "f()"),
946
new
SpanResult
(30, 24, 30, 33, "return 2"),
947
new
SpanResult
(29, 12, 31, 14, "var f1 = new Func<int>"),
948
new
SpanResult
(34, 23, 34, 28, "x + 3"),
949
new
SpanResult
(33, 12, 35, 14, "var f2 = new Func<int, int>"),
950
new
SpanResult
(38, 21, 38, 26, "x + 4"),
951
new
SpanResult
(37, 12, 39, 14, "var f3 = new Func<int, int>"));
2 references to SpanResult
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.cs (2)
1050
private static void VerifySpans(DynamicAnalysisDataReader reader, DynamicAnalysisMethod methodData, string[] sourceLines, params
SpanResult
[] expected)
1053
foreach (
SpanResult
expectedSpanResult in expected)