Skip to content

Commit

Permalink
[tests][mmp] Move TypeDescriptor (regression) tests to unit tests (#4994
Browse files Browse the repository at this point in the history
)

Also move some tests to share more (now and in future commits)
with iOS linker-related tests.

Part of #4975
  • Loading branch information
spouliot authored Oct 17, 2018
1 parent 6044a74 commit 6751f27
Show file tree
Hide file tree
Showing 19 changed files with 321 additions and 484 deletions.
93 changes: 93 additions & 0 deletions Xamarin.Mac.sln
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "generator", "src\generator.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "generator-tests", "tests\generator\generator-tests.csproj", "{10790816-D00E-40A0-8653-2A8AB4DD33A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "link sdk-mac", "tests\linker\mac\link sdk\link sdk-mac.csproj", "{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "link all-mac", "tests\linker\mac\link all\link all-mac.csproj", "{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dont link-mac-unified", "tests\linker\mac\dont link\dont link-mac-unified.csproj", "{78831857-A261-8EE0-A5F6-33D2628DE5D0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -351,6 +357,90 @@ Global
{10790816-D00E-40A0-8653-2A8AB4DD33A9}.winphone_Debug|Any CPU.Build.0 = Debug|Any CPU
{10790816-D00E-40A0-8653-2A8AB4DD33A9}.winphone_Release|Any CPU.ActiveCfg = Debug|Any CPU
{10790816-D00E-40A0-8653-2A8AB4DD33A9}.winphone_Release|Any CPU.Build.0 = Debug|Any CPU
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.Debug|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.Debug|Any CPU.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.Release|Any CPU.ActiveCfg = Release|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.Release|Any CPU.Build.0 = Release|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.Debug|x86.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.Debug|x86.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.Release|x86.ActiveCfg = Release|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.Release|x86.Build.0 = Release|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_2_0_Debug|Any CPU.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_2_0_Release|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_2_0_Release|Any CPU.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_3_5_Debug|Any CPU.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_3_5_Release|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_3_5_Release|Any CPU.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_4_0_Debug|Any CPU.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_4_0_Release|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.net_4_0_Release|Any CPU.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.silverlight_Debug|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.silverlight_Debug|Any CPU.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.silverlight_Release|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.silverlight_Release|Any CPU.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.winphone_Debug|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.winphone_Debug|Any CPU.Build.0 = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.winphone_Release|Any CPU.ActiveCfg = Debug|x86
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579}.winphone_Release|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.Debug|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.Debug|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.Release|Any CPU.ActiveCfg = Release|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.Release|Any CPU.Build.0 = Release|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.Debug|x86.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.Debug|x86.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.Release|x86.ActiveCfg = Release|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.Release|x86.Build.0 = Release|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_2_0_Debug|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_2_0_Release|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_2_0_Release|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_3_5_Debug|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_3_5_Release|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_3_5_Release|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_4_0_Debug|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_4_0_Release|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.net_4_0_Release|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.silverlight_Debug|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.silverlight_Debug|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.silverlight_Release|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.silverlight_Release|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.winphone_Debug|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.winphone_Debug|Any CPU.Build.0 = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.winphone_Release|Any CPU.ActiveCfg = Debug|x86
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}.winphone_Release|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.Debug|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.Debug|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.Release|Any CPU.ActiveCfg = Release|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.Release|Any CPU.Build.0 = Release|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.Debug|x86.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.Debug|x86.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.Release|x86.ActiveCfg = Release|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.Release|x86.Build.0 = Release|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_2_0_Debug|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_2_0_Release|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_2_0_Release|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_3_5_Debug|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_3_5_Release|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_3_5_Release|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_4_0_Debug|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_4_0_Release|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.net_4_0_Release|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.silverlight_Debug|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.silverlight_Debug|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.silverlight_Release|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.silverlight_Release|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.winphone_Debug|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.winphone_Debug|Any CPU.Build.0 = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.winphone_Release|Any CPU.ActiveCfg = Debug|x86
{78831857-A261-8EE0-A5F6-33D2628DE5D0}.winphone_Release|Any CPU.Build.0 = Debug|x86
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = tools\mmp\mmp.csproj
Expand Down Expand Up @@ -385,5 +475,8 @@ Global
{D12F0F7B-8DE3-43EC-BA49-41052D065A9B} = {542D4426-F287-4126-9889-E17628DAECEA}
{EA3E6B50-AE2B-4A63-BBFC-9888B93331CA} = {542D4426-F287-4126-9889-E17628DAECEA}
{10790816-D00E-40A0-8653-2A8AB4DD33A9} = {542D4426-F287-4126-9889-E17628DAECEA}
{F5FF0F5E-0C30-4719-A2B1-5DAE33D1E579} = {542D4426-F287-4126-9889-E17628DAECEA}
{4C943B12-C5AF-4CD4-B583-B4011D13CAAB} = {542D4426-F287-4126-9889-E17628DAECEA}
{78831857-A261-8EE0-A5F6-33D2628DE5D0} = {542D4426-F287-4126-9889-E17628DAECEA}
EndGlobalSection
EndGlobal
65 changes: 65 additions & 0 deletions tests/linker/CommonDontLinkTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
using System;
using System.Collections;
using System.Reflection;

using NUnit.Framework;

#if XAMCORE_2_0
using Foundation;
#elif MONOMAC
using MonoMac.Foundation;
#endif

namespace DontLink {

[TestFixture]
public class CommonDontLinkTest {

[Test]
public void TypeDescriptorCanary ()
{
// this will fail is ReflectTypeDescriptionProvider.cs is modified
var rtdp = Type.GetType ("System.ComponentModel.ReflectTypeDescriptionProvider, System");
Assert.NotNull (rtdp, "type");
var p = rtdp.GetProperty ("IntrinsicTypeConverters", BindingFlags.Static | BindingFlags.NonPublic);
Assert.NotNull (p, "property");
var ht = (Hashtable) p.GetGetMethod (true).Invoke (null, null);
Assert.NotNull (ht, "Hashtable");
Assert.That (ht.Count, Is.EqualTo (26), "Count");
foreach (var item in ht.Values) {
var name = item.ToString ();
switch (name) {
case "System.ComponentModel.DateTimeOffsetConverter":
case "System.ComponentModel.DecimalConverter":
case "System.ComponentModel.StringConverter":
case "System.ComponentModel.SByteConverter":
case "System.ComponentModel.CollectionConverter":
case "System.ComponentModel.ReferenceConverter":
case "System.ComponentModel.TypeConverter":
case "System.ComponentModel.DateTimeConverter":
case "System.ComponentModel.UInt64Converter":
case "System.ComponentModel.ArrayConverter":
case "System.ComponentModel.NullableConverter":
case "System.ComponentModel.Int16Converter":
case "System.ComponentModel.CultureInfoConverter":
case "System.ComponentModel.SingleConverter":
case "System.ComponentModel.UInt16Converter":
case "System.ComponentModel.GuidConverter":
case "System.ComponentModel.DoubleConverter":
case "System.ComponentModel.Int32Converter":
case "System.ComponentModel.TimeSpanConverter":
case "System.ComponentModel.CharConverter":
case "System.ComponentModel.Int64Converter":
case "System.ComponentModel.BooleanConverter":
case "System.ComponentModel.UInt32Converter":
case "System.ComponentModel.ByteConverter":
case "System.ComponentModel.EnumConverter":
break;
default:
Assert.Fail ($"Unknown type descriptor {name}");
break;
}
}
}
}
}
45 changes: 45 additions & 0 deletions tests/linker/CommonLinkAllTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using System.ComponentModel;

using NUnit.Framework;

using Foundation;

namespace LinkAll {

public class CustomConverter : TypeConverter {
// note: the default ctor will be preserved by the linker because it's used in a [TypeConverter] attribute
}

[TypeConverter (typeof (BooleanConverter))]
public class BuiltInConverter {
}

[TypeConverter (typeof (CustomConverter))]
class TypeDescriptorTest {
}

[TestFixture]
// we want the test to be availble if we use the linker
[Preserve (AllMembers = true)]
public class CommonLinkAllTest {

[Test]
public void TypeConverter_BuiltIn ()
{
Assert.NotNull (TypeDescriptor.GetConverter (new BuiltInConverter ()), "BuiltInConverter");

string name = (typeof (BuiltInConverter).GetCustomAttributes (false) [0] as TypeConverterAttribute).ConverterTypeName;
Assert.That (name, Is.EqualTo ("System.ComponentModel.BooleanConverter, System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"), "ConverterTypeName");
}

[Test]
public void TypeConverter_Custom ()
{
Assert.NotNull (TypeDescriptor.GetConverter (new TypeDescriptorTest ()), "TypeDescriptorTest");

string name = (typeof (TypeDescriptorTest).GetCustomAttributes (false) [0] as TypeConverterAttribute).ConverterTypeName;
Assert.That (name, Is.EqualTo ("LinkAll.CustomConverter, link all, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"), "ConverterTypeName");
}
}
}
99 changes: 99 additions & 0 deletions tests/linker/CommonLinkSdkTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Globalization;
using System.IO;

using NUnit.Framework;

using Foundation;

namespace LinkSdk {

[TestFixture]
// we want the test to be availble if we use the linker
[Preserve (AllMembers = true)]
public class CommonLinkSdkTest {

[Test]
public void TypeDescriptor_A7793 ()
{
var c = TypeDescriptor.GetConverter (typeof (DateTimeOffset));
Assert.That (c.GetType ().Name, Is.EqualTo ("DateTimeOffsetConverter"), "DateTimeOffsetConverter");

c = TypeDescriptor.GetConverter (typeof (decimal));
Assert.That (c.GetType ().Name, Is.EqualTo ("DecimalConverter"), "DecimalConverter");

c = TypeDescriptor.GetConverter (typeof (string));
Assert.That (c.GetType ().Name, Is.EqualTo ("StringConverter"), "StringConverter");

c = TypeDescriptor.GetConverter (typeof (sbyte));
Assert.That (c.GetType ().Name, Is.EqualTo ("SByteConverter"), "SByteConverter");

c = TypeDescriptor.GetConverter (typeof (Collection<string>));
Assert.That (c.GetType ().Name, Is.EqualTo ("CollectionConverter"), "CollectionConverter");

c = TypeDescriptor.GetConverter (typeof (INSCoding));
Assert.That (c.GetType ().Name, Is.EqualTo ("ReferenceConverter"), "ReferenceConverter");

c = TypeDescriptor.GetConverter (typeof (Type));
Assert.That (c.GetType ().Name, Is.EqualTo ("TypeConverter"), "TypeConverter");

c = TypeDescriptor.GetConverter (typeof (ulong));
Assert.That (c.GetType ().Name, Is.EqualTo ("UInt64Converter"), "UInt64Converter");

c = TypeDescriptor.GetConverter (typeof (int[]));
Assert.That (c.GetType ().Name, Is.EqualTo ("ArrayConverter"), "ArrayConverter");

c = TypeDescriptor.GetConverter (typeof (int?));
Assert.That (c.GetType ().Name, Is.EqualTo ("NullableConverter"), "NullableConverter");

c = TypeDescriptor.GetConverter (typeof (short));
Assert.That (c.GetType ().Name, Is.EqualTo ("Int16Converter"), "Int16Converter");

c = TypeDescriptor.GetConverter (typeof (CultureInfo));
Assert.That (c.GetType ().Name, Is.EqualTo ("CultureInfoConverter"), "CultureInfoConverter");

c = TypeDescriptor.GetConverter (typeof (float));
Assert.That (c.GetType ().Name, Is.EqualTo ("SingleConverter"), "SingleConverter");

c = TypeDescriptor.GetConverter (typeof (ushort));
Assert.That (c.GetType ().Name, Is.EqualTo ("UInt16Converter"), "UInt16Converter");

c = TypeDescriptor.GetConverter (typeof (Guid));
Assert.That (c.GetType ().Name, Is.EqualTo ("GuidConverter"), "GuidConverter");

c = TypeDescriptor.GetConverter (typeof (double));
Assert.That (c.GetType ().Name, Is.EqualTo ("DoubleConverter"), "DoubleConverter");

c = TypeDescriptor.GetConverter (typeof (int));
Assert.That (c.GetType ().Name, Is.EqualTo ("Int32Converter"), "Int32Converter");

c = TypeDescriptor.GetConverter (typeof (TimeSpan));
Assert.That (c.GetType ().Name, Is.EqualTo ("TimeSpanConverter"), "TimeSpanConverter");

c = TypeDescriptor.GetConverter (typeof (char));
Assert.That (c.GetType ().Name, Is.EqualTo ("CharConverter"), "CharConverter");

c = TypeDescriptor.GetConverter (typeof (long));
Assert.That (c.GetType ().Name, Is.EqualTo ("Int64Converter"), "Int64Converter");

c = TypeDescriptor.GetConverter (typeof (bool));
Assert.That (c.GetType ().Name, Is.EqualTo ("BooleanConverter"), "BooleanConverter");

c = TypeDescriptor.GetConverter (typeof (long));
Assert.That (c.GetType ().Name, Is.EqualTo ("Int64Converter"), "Int64Converter");

c = TypeDescriptor.GetConverter (typeof (uint));
Assert.That (c.GetType ().Name, Is.EqualTo ("UInt32Converter"), "UInt32Converter");

c = TypeDescriptor.GetConverter (typeof (FileShare));
Assert.That (c.GetType ().Name, Is.EqualTo ("EnumConverter"), "EnumConverter");

// special case - it's not in the default list we reflect in dont link tests

c = TypeDescriptor.GetConverter (typeof (IComponent));
Assert.That (c.GetType ().Name, Is.EqualTo ("ComponentConverter"), "ComponentConverter");
}
}
}
47 changes: 0 additions & 47 deletions tests/linker/ios/dont link/DontLinkRegressionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,53 +108,6 @@ public void DefaultEncoding ()
Assert.True (de.IsReadOnly, "IsReadOnly");
}

[Test]
public void TypeDescriptorCanary ()
{
// this will fail is ReflectTypeDescriptionProvider.cs is modified
var rtdp = Type.GetType ("System.ComponentModel.ReflectTypeDescriptionProvider, System");
Assert.NotNull (rtdp, "type");
var p = rtdp.GetProperty ("IntrinsicTypeConverters", BindingFlags.Static | BindingFlags.NonPublic);
Assert.NotNull (p, "property");
var ht = (Hashtable) p.GetGetMethod (true).Invoke (null, null);
Assert.NotNull (ht, "Hashtable");
Assert.That (ht.Count, Is.EqualTo (26), "Count");
foreach (var item in ht.Values) {
var name = item.ToString ();
switch (name) {
case "System.ComponentModel.DateTimeOffsetConverter":
case "System.ComponentModel.DecimalConverter":
case "System.ComponentModel.StringConverter":
case "System.ComponentModel.SByteConverter":
case "System.ComponentModel.CollectionConverter":
case "System.ComponentModel.ReferenceConverter":
case "System.ComponentModel.TypeConverter":
case "System.ComponentModel.DateTimeConverter":
case "System.ComponentModel.UInt64Converter":
case "System.ComponentModel.ArrayConverter":
case "System.ComponentModel.NullableConverter":
case "System.ComponentModel.Int16Converter":
case "System.ComponentModel.CultureInfoConverter":
case "System.ComponentModel.SingleConverter":
case "System.ComponentModel.UInt16Converter":
case "System.ComponentModel.GuidConverter":
case "System.ComponentModel.DoubleConverter":
case "System.ComponentModel.Int32Converter":
case "System.ComponentModel.TimeSpanConverter":
case "System.ComponentModel.CharConverter":
case "System.ComponentModel.Int64Converter":
case "System.ComponentModel.BooleanConverter":
case "System.ComponentModel.UInt32Converter":
case "System.ComponentModel.ByteConverter":
case "System.ComponentModel.EnumConverter":
break;
default:
Assert.Fail ($"Unknown type descriptor {name}");
break;
}
}
}

#if __TVOS__ || __WATCHOS__
void AssertThrowsWrappedNotSupportedException (Action action, string message)
{
Expand Down
3 changes: 3 additions & 0 deletions tests/linker/ios/dont link/dont link.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<Compile Include="DontLinkRegressionTests.cs" />
<Compile Include="TableViewSourceTest.cs" />
<Compile Include="CalendarTest.cs" />
<Compile Include="..\..\CommonDontLinkTest.cs">
<Link>CommonDontLinkTest.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="LaunchScreen.storyboard" Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" />
Expand Down
Loading

1 comment on commit 6751f27

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build was (probably) aborted

🔥 Jenkins job (on internal Jenkins) failed in stage(s) 'Build' 🔥 : hudson.AbortException: script returned exit code 2

🔥 Build failed 🔥

Please sign in to comment.