Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

2009-11-20 Zoltan Varga <vargaz@gmail.com>

	* libtest.c (mono_test_marshal_bool_in): Use 'short' as the type of the
	variant bool argument.

	* marshalbool.cs: Pass -1 as the 'expected' argument instead of 0xffff, which
	causes sign extensions issues on some platforms.

svn path=/trunk/mono/; revision=146610
  • Loading branch information...
commit c7eb61b25e192516a2ee6f7a2798e484a98d7e12 1 parent dc0d168
Zoltan Varga vargaz authored
8 mono/tests/ChangeLog
... ... @@ -1,3 +1,11 @@
  1 +2009-11-20 Zoltan Varga <vargaz@gmail.com>
  2 +
  3 + * libtest.c (mono_test_marshal_bool_in): Use 'short' as the type of the
  4 + variant bool argument.
  5 +
  6 + * marshalbool.cs: Pass -1 as the 'expected' argument instead of 0xffff, which
  7 + causes sign extensions issues on some platforms.
  8 +
1 9 2009-11-19 Zoltan Varga <vargaz@gmail.com>
2 10
3 11 * dtest.cs: Add a test for AssemblyMirror.GetName ().
2  mono/tests/libtest.c
@@ -3952,7 +3952,7 @@ mono_test_Winx64_struct5_ret_managed (managed_struct5_ret_delegate func)
3952 3952
3953 3953 LIBTEST_API int STDCALL
3954 3954 mono_test_marshal_bool_in (int arg, unsigned int expected, unsigned int bDefaultMarsh, unsigned int bBoolCustMarsh,
3955   - char bI1CustMarsh, unsigned char bU1CustMarsh, unsigned short bVBCustMarsh)
  3955 + char bI1CustMarsh, unsigned char bU1CustMarsh, short bVBCustMarsh)
3956 3956 {
3957 3957 switch (arg) {
3958 3958 case 1:
5 mono/tests/marshalbool.cs
@@ -154,11 +154,12 @@ unsafe public static int test_0_U1_In_Native ()
154 154 unsafe public static int test_0_VariantBool_In_Native ()
155 155 {
156 156 int ret;
  157 + int m1 = -1;
157 158
158 159 ret = mono_test_marshal_bool_in (5, 0, false, false, false, false, false);
159 160 if (ret != 0)
160 161 return 0x0100 + ret;
161   - ret = mono_test_marshal_bool_in (5, 0xFFFF, false, false, false, false, true);
  162 + ret = mono_test_marshal_bool_in (5, (uint)m1, false, false, false, false, true);
162 163 if (ret != 0)
163 164 return 0x0200 + ret;
164 165
@@ -166,7 +167,7 @@ unsafe public static int test_0_VariantBool_In_Native ()
166 167 bool* ptestVal = &testVal;
167 168
168 169 Marshal.WriteByte ((IntPtr)ptestVal, 0x22);
169   - ret = mono_test_marshal_bool_in (5, 0xFFFF, false, false, false, false, testVal);
  170 + ret = mono_test_marshal_bool_in (5, (uint)m1, false, false, false, false, testVal);
170 171 if (ret != 0)
171 172 return 0x0300 + ret;
172 173

0 comments on commit c7eb61b

Please sign in to comment.
Something went wrong with that request. Please try again.