Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

48
mcs/tests/test-12.cs Normal file
View File

@@ -0,0 +1,48 @@
/*
* Tests the ?: operator and the string concatenation
*/
using System;
class X {
public static int Main (string [] args)
{
string a = "hello";
string b = "1";
string c = a + b;
string d = a + 1;
string y;
if (c != d)
return 1;
if (d != (a + b))
return 2;
if (d != x (a, b))
return 3;
if (d != x (a, 1))
return 4;
y = c == d ? "equal" : "not-equal";
if (y != "equal")
return 5;
y = b == a ? "oops" : "nice";
if (y != "nice")
return 6;
string [] blah = { "A"+'B'+"C" };
if (blah [0] != "ABC")
return 7;
Console.WriteLine (c);
return 0;
}
static string s (string a, int o)
{
return a + o;
}
static string x (string s, object o)
{
return s + o;
}
}