diff options
Diffstat (limited to 'mcs/tests/test-23.cs')
-rw-r--r-- | mcs/tests/test-23.cs | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/mcs/tests/test-23.cs b/mcs/tests/test-23.cs deleted file mode 100644 index 0723c667d95..00000000000 --- a/mcs/tests/test-23.cs +++ /dev/null @@ -1,106 +0,0 @@ -// -// Tests properties -// -using System; - -class X { - static int v; - - static X () - { - v = 10; - } - - public static int Value { - get { - return v; - } - - set { - v = value; - } - } - - static int Main () - { - if (Value != 10) - return 1; - - Value = 4; - - if (Value != 4) - return 2; - - Y y = new Y ("hello"); - - if (y.Value != "hello") - return 3; - - y.Value = "goodbye"; - if (y.Value != "goodbye") - return 4; - - Z z = new Z (); - - if (Z.IVal != 4) - return 5; - Z.IVal = 10; - if (Z.IVal != 10) - return 6; - - z.XVal = 23; - if (z.XVal != 23) - return 7; - - return 0; - } -} - -class Y { - string init; - - public Y (string s) - { - init = s; - } - - public string Value { - get { - return init; - } - - set { - init = value; - } - } -} - -struct Z { - static int val; - int xval; - - static Z () - { - val = 4; - } - - static public int IVal { - get { - return val; - } - - set { - val= value; - } - } - - public int XVal { - get { - return xval; - } - - set { - xval = value; - } - } -} |