Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2001-11-08 03:17:45 +0300
committerMiguel de Icaza <miguel@gnome.org>2001-11-08 03:17:45 +0300
commit52bbd6cf4057f1691d23a5cff241a49fed9f6d4d (patch)
tree0bd284d7e7eb99d572de2ca24fa51d050c9cfb10 /mcs/tests/test-38.cs
parent3c3ef2ba0fecc567b667eb5ffa0f55a003d9977c (diff)
Add more tests
svn path=/trunk/mcs/; revision=1285
Diffstat (limited to 'mcs/tests/test-38.cs')
-rwxr-xr-xmcs/tests/test-38.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/mcs/tests/test-38.cs b/mcs/tests/test-38.cs
new file mode 100755
index 00000000000..69dbbc3f936
--- /dev/null
+++ b/mcs/tests/test-38.cs
@@ -0,0 +1,36 @@
+class X {
+ int v1, v2;
+
+ int this [int a] {
+ get {
+ if (a == 0)
+ return v1;
+ else
+ return v2;
+ }
+
+ set {
+ if (a == 0)
+ v1 = value;
+ else
+ v2 = value;
+ }
+ }
+
+ static int Main ()
+ {
+ X x = new X ();
+ int b;
+
+ x [0] = x [1] = 1;
+ x [0] = 1;
+ if (x.v1 != 1)
+ return 1;
+
+ if (x [0] != 1)
+ return 2;
+
+ return 0;
+
+ }
+}