Merge pull request #4998 from kumpera/fix_56684
[mono.git] / mcs / tests / test-76.cs
1 //
2 // This test is used to verify that we handle functions that have
3 // only an array parameter
4 //
5
6 using System;
7 using System.Text;
8
9 class foo {
10
11         static string strcat (params string [] values)
12         {
13                 StringBuilder s = new StringBuilder ();
14                 
15                 foreach (string val in values) {
16                         s.Append (val);
17                 }
18
19                 return s.ToString ();
20         }
21
22         public static int Main ()
23         {
24                 if (strcat ("Hello", "World") != "HelloWorld")
25                         return 1;
26
27                 if (strcat () != "")
28                         return 2;
29
30                 if (strcat ("a", "b", "c", "d", "e") != "abcde")
31                         return 3;
32
33                 return 0;
34         }
35 };