added more pinvoke test methods
authorRadek Doulik <rodo@mono-cvs.ximian.com>
Tue, 19 Feb 2002 20:53:40 +0000 (20:53 -0000)
committerRadek Doulik <rodo@mono-cvs.ximian.com>
Tue, 19 Feb 2002 20:53:40 +0000 (20:53 -0000)
svn path=/trunk/mono/; revision=2525

ChangeLog
mono/tests/pinvoke.cs

index 2491f5e303e74ea82dbe90995e52445ae5a10531..b9986e1b66c5cd04acfae0848fbbca60093f4066 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-02-19  Radek Doulik  <rodo@ximian.com>
+
+       * mono/tests/pinvoke.cs: use more pinvoke test methods
+
 2002-02-19  Radek Doulik  <rodo@ximian.com>
 
        * mono/tests/libtest.c (mono_test_many_short_arguments): new test
index 2e65b64244d3a672f68aa5315ea7fefc01055bf1..81e4c13ea14900a61d8b23c41530b3270f9f99f8 100755 (executable)
@@ -6,9 +6,15 @@ public class Test {
        [DllImport("cygwin1.dll", EntryPoint="puts", CharSet=CharSet.Ansi)]
        public static extern int puts (string name);
 
-       [DllImport (".libs/libtest.so", EntryPoint="mono_test_many_int_arguments")]
+       [DllImport ("libtest.so", EntryPoint="mono_test_many_int_arguments")]
        public static extern int mono_test_many_int_arguments (int a, int b, int c, int d, int e,
                                                               int f, int g, int h, int i, int j);
+       [DllImport ("libtest.so", EntryPoint="mono_test_many_short_arguments")]
+       public static extern int mono_test_many_short_arguments (short a, short b, short c, short d, short e,
+                                                                short f, short g, short h, short i, short j);
+       [DllImport ("libtest.so", EntryPoint="mono_test_many_byte_arguments")]
+       public static extern int mono_test_many_byte_arguments (byte a, byte b, byte c, byte d, byte e,
+                                                               byte f, byte g, byte h, byte i, byte j);
 
        public static int Main () {
                puts ("A simple Test for PInvoke");
@@ -19,6 +25,10 @@ public class Test {
                        return 1;
                if (mono_test_many_int_arguments (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) != 10)
                        return 1;
+               if (mono_test_many_short_arguments (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) != 55)
+                       return 1;
+               if (mono_test_many_byte_arguments (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) != 55)
+                       return 1;
                
                return 0;
        }