Added tests for Task.WhenAll w/ empty list
[mono.git] / mcs / tests / test-anon-94.cs
1 // Compiler options: -r:test-anon-94-lib.dll
2
3 using System;
4
5 class Program
6 {
7         public class BaseClass
8         {
9                 public int i;
10                 public virtual void Print () { Console.WriteLine ("BaseClass.Print"); i = 90; }
11         }
12
13         public class Derived : BaseClass
14         {
15                 public override void Print ()
16                 {
17                         Action a = () => base.Print ();
18                         a ();
19                 }
20         }
21         
22         public class DerivedLibrary : BaseClassLibrary
23         {
24                 public override void Print (int arg)
25                 {
26                         Action a = () => base.Print (30);
27                         a ();
28                 }
29         }
30
31         public static int Main ()
32         {
33                 var d = new Derived ();
34                 d.Print ();
35
36                 if (d.i != 90)
37                         return 1;
38
39                 var d2 = new DerivedLibrary ();
40                 d2.Print (0);
41
42                 if (d2.i != 30)
43                         return 2;
44
45                 return 0;
46         }
47 }