Skip to content

Commit 834ad60

Browse files
committed
UncaughtExceptionTests.EnsureUncaughtExceptionWorks works
1 parent 956ed60 commit 834ad60

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/MSBuildDeviceIntegration/Tests/UncaughtExceptionTests.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.IO;
44
using System.Text.RegularExpressions;
55
using NUnit.Framework;
6+
using Xamarin.Android.Tasks;
67
using Xamarin.ProjectTools;
78

89
namespace Xamarin.Android.Build.Tests
@@ -20,12 +21,18 @@ class LogcatLine
2021
};
2122

2223
[Test]
23-
public void EnsureUncaughtExceptionWorks ()
24+
public void EnsureUncaughtExceptionWorks ([Values] AndroidRuntime runtime)
2425
{
26+
bool isRelease = runtime == AndroidRuntime.NativeAOT;
27+
if (IgnoreUnsupportedConfiguration (runtime, release: isRelease)) {
28+
return;
29+
}
30+
2531
var lib = new XamarinAndroidBindingProject {
2632
ProjectName = "Scratch.Try",
2733
AndroidClassParser = "class-parse",
2834
};
35+
lib.SetRuntime (runtime);
2936

3037
lib.Imports.Add (
3138
new Import (() => "Directory.Build.targets") {
@@ -89,9 +96,11 @@ public static final void tryCatchFinally (Runnable r, CatchThrowableHandler c, R
8996
"
9097
});
9198

92-
var app = new XamarinAndroidApplicationProject {
99+
var app = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) {
100+
IsRelease = isRelease,
93101
ProjectName = "Scratch.JMJMException",
94102
};
103+
app.SetRuntime (runtime);
95104

96105
app.SetDefaultTargetDevice ();
97106
app.AddReference (lib);

0 commit comments

Comments
 (0)