[xbuild] ToolTask - make error column check a little non-specific.
[mono.git] / mcs / tests / test-named-04.cs
1 using System;
2
3 struct S
4 {
5         public int Foo;
6 }
7
8 class Program
9 {
10         static void Foo2 (int a, ref int b)
11         {
12                 Console.WriteLine (a);
13                 Console.WriteLine (b);
14                 
15                 if (a != 0 || b != 0)
16                         throw new ApplicationException ();
17
18                 b = 500;
19         }
20
21         public static int Main ()
22         {
23                 var a = new S [] { new S (), new S (), new S () };
24                 int i = 1;
25                 Foo2 (b: ref a[i].Foo, a: a[++i].Foo++);
26
27                 Console.WriteLine (a[0].Foo);
28                 Console.WriteLine (a[1].Foo);
29                 Console.WriteLine (a[2].Foo);
30                 
31                 if (a [0].Foo != 0)
32                         return 1;
33                 
34                 if (a [1].Foo != 500)
35                         return 2;
36                 
37                 if (a [2].Foo != 1)
38                         return 3;
39                 
40                 return 0;
41         }
42 }