static readonly Type generic_icollection_type;
static readonly Type generic_ienumerable_type;
static readonly Type icloneable_type;
+#if NET_4_0
+ static readonly Type istructuralequatable_type = typeof (IStructuralEquatable);
+ static readonly Type istructuralcomparable_type = typeof (IStructuralComparable);
+#endif
static InterfaceTester ()
{
ifaces.Add (icollection_type, State.Missing);
ifaces.Add (ienumerable_type, State.Missing);
ifaces.Add (icloneable_type, State.Missing);
+#if NET_4_0
+ ifaces.Add (istructuralequatable_type, State.Missing);
+ ifaces.Add (istructuralcomparable_type, State.Missing);
+#endif
Type array_type = t.MakeArrayType ();
public static int Test ()
{
- int result = Test (typeof (X), typeof (X), typeof (Y), typeof (object));
+ int result = Test (typeof (X), typeof (X));
if (result != 0)
return result;
- result = Test (typeof (Y), typeof (Y), typeof (object));
+ result = Test (typeof (Y), typeof (Y));
if (result != 0)
return 100 + result;
if (result != 0)
return 300 + result;
- result = Test (typeof (int), typeof (int), typeof (uint));
+ result = Test (typeof (int), typeof (int));
if (result != 0)
return 400 + result;
- result = Test (typeof (uint), typeof (int), typeof (uint));
+ result = Test (typeof (uint), typeof (uint));
if (result != 0)
return 500 + result;
- result = Test (typeof (long), typeof (long), typeof (ulong));
+ result = Test (typeof (long), typeof (long));
if (result != 0)
return 600 + result;
- result = Test (typeof (ulong), typeof (long), typeof (ulong));
+ result = Test (typeof (ulong), typeof (ulong));
if (result != 0)
return 700 + result;
- result = Test (typeof (short), typeof (short), typeof (ushort));
+ result = Test (typeof (short), typeof (short));
if (result != 0)
return 800 + result;
- result = Test (typeof (ushort), typeof (short), typeof (ushort));
+ result = Test (typeof (ushort), typeof (ushort));
if (result != 0)
return 900 + result;
return 0;
}
- static int Main ()
+ public static int Main ()
{
int result = Test ();
if (result == 0)