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>2003-02-15 00:35:27 +0300
committerMiguel de Icaza <miguel@gnome.org>2003-02-15 00:35:27 +0300
commit27f43d377a33204e886a62b9e69c2a58c7ecc1b6 (patch)
treec4e1b448d1b20732e4a12a1e05b382346deb0ad4 /mcs/tests/test-183.cs
parent10f6a0130bfafc4d8efb3963ca2d1074319aeda5 (diff)
More tests
svn path=/trunk/mcs/; revision=11590
Diffstat (limited to 'mcs/tests/test-183.cs')
-rw-r--r--mcs/tests/test-183.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/mcs/tests/test-183.cs b/mcs/tests/test-183.cs
new file mode 100644
index 00000000000..6d81e446f4a
--- /dev/null
+++ b/mcs/tests/test-183.cs
@@ -0,0 +1,33 @@
+//
+// This test just verifies that we generate the proper signature for
+// EndInvoke, something that we were not doing before in the presence
+// of out parameters
+
+using System;
+
+class Test
+{
+ delegate int D (int x, out int y);
+
+ static int M (int x, out int y)
+ {
+ y = x + 2;
+ return ++x;
+ }
+
+ static int Main ()
+ {
+ int x = 1;
+ int y = 0;
+
+ D del = new D (M);
+ IAsyncResult ar = del.BeginInvoke (x, out y, null, null);
+ if (del.EndInvoke (out y, ar) != 2)
+ return 1;
+ if (y != 3)
+ return 2;
+
+ Console.WriteLine ("Test ok");
+ return 0;
+ }
+}