}
LIBTEST_API int STDCALL
-mono_test_marshal_stringbuilder2 (char *s, int n)
+mono_test_marshal_stringbuilder_append (char *s, int length)
{
- const char m[] = "EFGH";
+ const char out_sentinel[] = "CSHARP_";
+ const char out_len = strlen (out_sentinel);
+
+ for (int i=0; i < length; i++) {
+ s [i] = out_sentinel [i % out_len];
+ }
+
+ s [length] = '\0';
+
- strncpy(s, m, n);
- s [n] = '\0';
return 0;
}
#endif
}
+LIBTEST_API EmptyStruct STDCALL
+mono_test_return_empty_struct (int a)
+{
+ EmptyStruct s;
+
+ g_assert (a == 42);
+
+ return s;
+}
+
typedef struct {
char a[100];
} ByValStrStruct;
if (a1->A != 42)
return 8;
- if (!fabs (a1->B - 3.1415) < 0.001)
+ if (!(fabs (a1->B - 3.1415) < 0.001))
return 9;
break;
if (a1->A != 42)
return 5;
- if (!fabs (a1->B - 3.1415) < 0.001)
+ if (!(fabs (a1->B - 3.1415) < 0.001))
return 6;
break;