Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Aug 15, 2023
1 parent cdd6d52 commit 8d8ab6f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/dotnet/UnitTests/ProjectTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,23 @@ public void BuildAndExecuteAppWithWinExeOutputType (ApplePlatform platform, stri
Assert.AreEqual ($"WinExe is not a valid output type for macOS", errors [0].Message, "Error message");
}

[Test]
[TestCase (ApplePlatform.iOS, "iossimulator-x64")]
[TestCase (ApplePlatform.MacOSX, "osx-arm64")]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64")]
public void PublishAotDuringBuild (ApplePlatform platform, string runtimeIdentifiers)
{
var project = "MySimpleApp";
Configuration.IgnoreIfIgnoredPlatform (platform);
Configuration.AssertRuntimeIdentifiersAvailable (platform, runtimeIdentifiers);

var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifiers, platform: platform, out var appPath);
Clean (project_path);
var properties = GetDefaultProperties (runtimeIdentifiers);
properties ["PublishAot"] = "true";
DotNet.AssertBuild (project_path, properties);
}

void AssertThatDylibExistsAndIsReidentified (string appPath, string dylibRelPath)
{
var dylibPath = Path.Join (appPath, "Contents", "MonoBundle", dylibRelPath);
Expand Down

0 comments on commit 8d8ab6f

Please sign in to comment.