Take stars out of types where they make more sense.
[mono-project.git] / mcs / tests / test-77.cs
blob7da6a379d434d5dea00cece92cc1bd7e8ccf2396
1 //
2 // Tests the various string implicit conversions
3 //
5 class XX {
7 enum X {
8 A = 1
11 public static int Main ()
13 int one = 1;
14 int two = 2;
16 if (("a" + "b") != "ab")
17 return 1;
19 if (("one" + one) != "one1")
20 return 2;
22 if ((one + "one") != "1one")
23 return 3;
25 if ((one + "two" + two) != "1two2")
26 return 4;
28 if ((X.A + "a") != "Aa")
29 return 5;
31 if (((int)X.A) + "a" != "1a")
32 return 6;
34 if ((1 + " " + "hello") != "1 hello")
35 return 7;
37 const string s1 = null + (string)null;
38 const string s2 = (string)null + null;
40 string s;
41 s = (string)null + null;
42 if (s.Length != 0)
43 return 8;
45 s = null + (string)null;
46 if (s.Length != 0)
47 return 9;
49 s = (object)null + null;
50 if (s.Length != 0)
51 return 10;
53 s = null + (object)null;
54 if (s.Length != 0)
55 return 11;
57 s = (object)1 + null;
58 if (s != "1")
59 return 12;
61 s = (string)null + (object)null;
62 if (s.Length != 0)
63 return 13;
65 s = (object)null + (string)null;
66 if (s.Length != 0)
67 return 14;
69 System.Console.WriteLine ("test ok");
70 return 0;