Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
[mono.git] / mcs / tests / test-4.cs
1 using System;
2 class X {
3         bool sbyte_selected;
4         bool int_selected;
5
6         void test (sbyte s)
7         {
8                 sbyte_selected = true;
9         }
10
11         void test (int i)
12         {
13                 int_selected = true;
14         }
15
16         public static int Main ()
17         {
18                 X x = new X ();
19
20                 x.test (1); 
21                 if (x.sbyte_selected){
22                         Console.WriteLine ("FAILED: Sbyte selected on constant int argument");
23                         return 1;
24                 } else {
25                         Console.WriteLine ("OK: int selected for constant int");
26                 }
27                 
28                 X y = new X ();
29                 sbyte s = 10;
30
31                 y.test (s);
32                 if (y.sbyte_selected){
33                         Console.WriteLine ("OK: sbyte selected for sbyte argument");
34                 } else {
35                         Console.WriteLine ("FAILED: sbyte not selected for sbyte argument");
36                         return 1;
37                 }
38                 return 0;
39         }
40 }