Skip to content

Commit 26fff7a

Browse files
[tests] we can assert 0 trimmer warnings again
This is fixed: dotnet/runtime#100256
1 parent 6d95147 commit 26fff7a

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,7 @@ public void BuildHasNoWarnings (bool isRelease, bool xamarinForms, bool multidex
260260
proj.SetProperty ("TrimmerSingleWarn", "false");
261261
using (var b = CreateApkBuilder (Path.Combine ("temp", TestName))) {
262262
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
263-
// FIXME: https://github.com/dotnet/runtime/issues/100256
264-
if (!xamarinForms && isRelease) {
265-
Assert.IsTrue (StringAssertEx.ContainsText (b.LastBuildOutput, " 4 Warning(s)"), $"{b.BuildLogFile} should have 4 MSBuild warnings.");
266-
} else {
267-
b.AssertHasNoWarnings ();
268-
}
263+
b.AssertHasNoWarnings ();
269264
Assert.IsFalse (StringAssertEx.ContainsText (b.LastBuildOutput, "Warning: end of file not at end of a line"),
270265
"Should not get a warning from the <CompileNativeAssembly/> task.");
271266
var lockFile = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, ".__lock");

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,7 @@ public void DotNetNew ([Values ("android", "androidlib", "android-bindinglib", "
4242

4343
// Release build
4444
Assert.IsTrue (dotnet.Build (parameters: new [] { "Configuration=Release", "TrimmerSingleWarn=false" }), "`dotnet build` should succeed");
45-
// FIXME: https://github.com/dotnet/runtime/issues/100256
46-
if (template.Contains ("lib")) {
47-
dotnet.AssertHasNoWarnings ();
48-
} else {
49-
Assert.IsTrue (StringAssertEx.ContainsText (dotnet.LastBuildOutput, " 4 Warning(s)"), $"{dotnet.BuildLogFile} should have 4 MSBuild warnings.");
50-
}
45+
dotnet.AssertHasNoWarnings ();
5146
}
5247

5348
static readonly object[] DotNetPackTargetFrameworks = new object[] {

0 commit comments

Comments
 (0)