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