Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text;
using Xamarin.Android.Tasks;
using Xamarin.ProjectTools;
using System.Collections.Generic;

namespace Xamarin.Android.Build.Tests
{
Expand All @@ -13,8 +14,11 @@ public class AssetPackTests : BaseTest
{
[Test]
[Category ("SmokeTests")]
public void BuildLibraryWithAssetPack ([Values (true, false)] bool isRelease)
public void BuildLibraryWithAssetPack ([Values] bool isRelease, [Values] AndroidRuntime runtime)
{
if (IgnoreUnsupportedConfiguration (runtime, release: isRelease)) {
return;
}
var path = Path.Combine ("temp", TestName);
var lib = new XamarinAndroidLibraryProject {
IsRelease = isRelease,
Expand All @@ -26,6 +30,7 @@ public void BuildLibraryWithAssetPack ([Values (true, false)] bool isRelease)
},
}
};
lib.SetRuntime (runtime);
using (var builder = CreateDllBuilder (Path.Combine (path, lib.ProjectName))) {
builder.ThrowOnBuildFailure = false;
Assert.IsFalse (builder.Build (lib), $"{lib.ProjectName} should fail.");
Expand All @@ -36,13 +41,11 @@ public void BuildLibraryWithAssetPack ([Values (true, false)] bool isRelease)

[Test]
[Category ("SmokeTests")]
[TestCase (false, AndroidRuntime.MonoVM)]
[TestCase (true, AndroidRuntime.MonoVM)]
[TestCase (false, AndroidRuntime.CoreCLR)]
[TestCase (true, AndroidRuntime.CoreCLR)]
[TestCase (true, AndroidRuntime.NativeAOT)]
public void BuildApplicationWithAssetPackThatHasInvalidName (bool isRelease, AndroidRuntime runtime)
public void BuildApplicationWithAssetPackThatHasInvalidName ([Values] bool isRelease, [Values] AndroidRuntime runtime)
{
if (IgnoreUnsupportedConfiguration (runtime, release: isRelease)) {
return;
}
var path = Path.Combine ("temp", TestName);
var app = new XamarinAndroidApplicationProject {
IsRelease = isRelease,
Expand All @@ -66,13 +69,11 @@ public void BuildApplicationWithAssetPackThatHasInvalidName (bool isRelease, And

[Test]
[Category ("SmokeTests")]
[TestCase (false, AndroidRuntime.MonoVM)]
[TestCase (true, AndroidRuntime.MonoVM)]
[TestCase (false, AndroidRuntime.CoreCLR)]
[TestCase (true, AndroidRuntime.CoreCLR)]
[TestCase (true, AndroidRuntime.NativeAOT)]
public void BuildApplicationWithAssetPackOutsideProjectDirectory (bool isRelease, AndroidRuntime runtime)
public void BuildApplicationWithAssetPackOutsideProjectDirectory ([Values] bool isRelease, [Values] AndroidRuntime runtime)
{
if (IgnoreUnsupportedConfiguration (runtime, release: isRelease)) {
return;
}
var path = Path.Combine ("temp", TestName);
var app = new XamarinAndroidApplicationProject {
ProjectName = "MyApp",
Expand Down Expand Up @@ -117,13 +118,11 @@ public void BuildApplicationWithAssetPackOutsideProjectDirectory (bool isRelease

[Test]
[Category ("SmokeTests")]
[TestCase (false, AndroidRuntime.MonoVM)]
[TestCase (true, AndroidRuntime.MonoVM)]
[TestCase (false, AndroidRuntime.CoreCLR)]
[TestCase (true, AndroidRuntime.CoreCLR)]
[TestCase (true, AndroidRuntime.NativeAOT)]
public void BuildApplicationWithAssetPackOverrides (bool isRelease, AndroidRuntime runtime)
public void BuildApplicationWithAssetPackOverrides ([Values] bool isRelease, [Values] AndroidRuntime runtime)
{
if (IgnoreUnsupportedConfiguration (runtime, release: isRelease)) {
return;
}
var path = Path.Combine ("temp", TestName);
var app = new XamarinAndroidApplicationProject {
ProjectName = "MyApp",
Expand Down Expand Up @@ -161,13 +160,11 @@ public void BuildApplicationWithAssetPackOverrides (bool isRelease, AndroidRunti

[Test]
[Category ("SmokeTests")]
[TestCase (false, AndroidRuntime.MonoVM)]
[TestCase (true, AndroidRuntime.MonoVM)]
[TestCase (false, AndroidRuntime.CoreCLR)]
[TestCase (true, AndroidRuntime.CoreCLR)]
[TestCase (true, AndroidRuntime.NativeAOT)]
public void BuildApplicationWithAssetPack (bool isRelease, AndroidRuntime runtime)
public void BuildApplicationWithAssetPack ([Values] bool isRelease, [Values] AndroidRuntime runtime)
{
if (IgnoreUnsupportedConfiguration (runtime, release: isRelease)) {
return;
}
var path = Path.Combine ("temp", TestName);
var asset3 = new AndroidItem.AndroidAsset ("Assets\\asset3.txt") {
TextContent = () => "Asset3",
Expand Down
Loading
Loading