Skip to content

Commit

Permalink
[tests][mmp] Convert old mmp calendar regression tests to unit tests (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
spouliot authored Oct 15, 2018
1 parent 250fd97 commit e8b87b7
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 308 deletions.
14 changes: 13 additions & 1 deletion tests/linker/mac/link all/LinkAllTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@ namespace LinkAllTests
[Preserve (AllMembers = true)]
public class LinkAllTest
{

static void Check (string calendarName, bool present)
{
var type = Type.GetType ("System.Globalization." + calendarName);
bool success = present == (type != null);
Assert.AreEqual (present, type != null, calendarName);
}

[Test]
public void Existence ()
public void Calendars ()
{
Check ("GregorianCalendar", true);
Check ("UmAlQuraCalendar", false);
Check ("HijriCalendar", false);
Check ("ThaiBuddhistCalendar", false);
}
}
}
14 changes: 13 additions & 1 deletion tests/linker/mac/link sdk/LinkSdkTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@ namespace LinkSdkTests
[Preserve (AllMembers = true)]
public class LinkSdkTest
{
static void Check (string calendarName, bool present)
{
var type = Type.GetType ("System.Globalization." + calendarName);
bool success = present == (type != null);
Assert.AreEqual (present, type != null, calendarName);
}

[Test]
public void Existence ()
public void Calendars ()
{
Check ("GregorianCalendar", true);
// because project options enabled them
Check ("UmAlQuraCalendar", true);
Check ("HijriCalendar", true);
Check ("ThaiBuddhistCalendar", true);
}
}
}
2 changes: 2 additions & 0 deletions tests/linker/mac/link sdk/link sdk-mac.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<LinkMode>SdkOnly</LinkMode>
<XamMacArch></XamMacArch>
<AOTMode>None</AOTMode>
<I18n>mideast,other</I18n>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType></DebugType>
Expand All @@ -49,6 +50,7 @@
<HttpClientHandler></HttpClientHandler>
<XamMacArch></XamMacArch>
<AOTMode>None</AOTMode>
<I18n>mideast,other</I18n>
<CodeSigningKey>Mac Developer</CodeSigningKey>
<PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
</PropertyGroup>
Expand Down
2 changes: 0 additions & 2 deletions tests/mmptest/regression/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ TESTS_4_0 = \
link-frameworks-1 \
link-aes-1 \
link-blocks-1 \
link-preserve-calendar-1 \
link-preserve-calendar-2 \
link-typedescriptor-1 \
link-typedescriptor-2 \
embedded-mono \
Expand Down
22 changes: 0 additions & 22 deletions tests/mmptest/regression/link-preserve-calendar-1/Info.plist

This file was deleted.

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions tests/mmptest/regression/link-preserve-calendar-2/Info.plist

This file was deleted.

This file was deleted.

This file was deleted.

2 comments on commit e8b87b7

@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 🔥

@spouliot
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please sign in to comment.