Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS/tvOS/MacCatalyst] Disable some of the library tests due to failures #56074

Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
09239c9
Disable some of System.Diagnostics.Tracing.Tests tests due to failures
MaximLipnin Jul 21, 2021
38224c8
Disable ImageTests.FromFile_NullFileName_ThrowsArgumentNullException …
MaximLipnin Jul 21, 2021
146049d
Disable System.Runtime.Tests.JitInfoTests.JitInfoIsPopulated test
MaximLipnin Jul 21, 2021
99b22ae
Disable System.Drawing.Tests.ImageTests.FromFile_LongSegment_ThrowsEx…
MaximLipnin Jul 21, 2021
71f614c
Exclude System.Runtime.Experimental.Tests test suite due to an app crash
MaximLipnin Jul 21, 2021
48ed88e
Disable System.Drawing.Tests.BrushTests.SetNativeBrush_Brush_Success
MaximLipnin Jul 21, 2021
3c7d0c4
Disable some of System.Tests.OperatingSystemTests test on MacCatalyst
MaximLipnin Jul 21, 2021
3d78e69
Disable System.Text.Json.SourceGeneration.Tests on MacCatalyst due to…
MaximLipnin Jul 21, 2021
0ffee55
Merge branch 'main' into disable_tests_on_ios_tvos_maccatalyst
MaximLipnin Jul 21, 2021
49eb711
Disable System.Drawing.Drawing2D.Tests.HatchBrushTests.Ctor_InvalidHa…
MaximLipnin Jul 21, 2021
f697280
Disable System.Drawing.Tests.ImageTests.FromFile_NoSuchFile_ThrowsFil…
MaximLipnin Jul 21, 2021
efa5866
Merge branch 'main' into disable_tests_on_ios_tvos_maccatalyst
MaximLipnin Jul 21, 2021
5aa66f1
Use IsDrawingSupported helper for System.Drawing.Common tests
MaximLipnin Jul 21, 2021
9385989
Merge branch 'main' into disable_tests_on_ios_tvos_maccatalyst
MaximLipnin Jul 22, 2021
8864f7d
Annotate the entire System.Drawing.Tests.ImageTests class with Platfo…
MaximLipnin Jul 22, 2021
e5d8808
Remove individual method annotations in favor of class annotation
MaximLipnin Jul 22, 2021
a5660f2
Move back conditional theory attribute for System.Drawing.Tests.Image…
MaximLipnin Jul 22, 2021
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
Prev Previous commit
Next Next commit
Remove individual method annotations in favor of class annotation
  • Loading branch information
MaximLipnin committed Jul 22, 2021
commit e5d8808bfb6be96cbcb0df6b41b8189e0112778a
48 changes: 24 additions & 24 deletions src/libraries/System.Drawing.Common/tests/ImageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public class ImageTests
private const int PropertyTagTypeShort = 3;

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
public void PropertyIdList_GetBitmapJpg_Success()
{
using var bitmap = new Bitmap(Helpers.GetTestBitmapPath("nature24bits.jpg"));
Assert.Equal(new int[] { PropertyTagExifUserComment, PropertyTagChrominanceTable, PropertyTagLuminanceTable }, bitmap.PropertyIdList);
Assert.NotSame(bitmap.PropertyIdList, bitmap.PropertyIdList);
}

[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Returns new int[0] in .NET Framework.")]
public void PropertyIdList_GetEmptyMemoryBitmap_ReturnsExpected()
{
Expand All @@ -42,7 +42,7 @@ public void PropertyIdList_GetEmptyMemoryBitmap_ReturnsExpected()
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
public void PropertyItems_GetBitmapJpg_Success()
{
using var bitmap = new Bitmap(Helpers.GetTestBitmapPath("nature24bits.jpg"));
Expand Down Expand Up @@ -84,7 +84,7 @@ public void PropertyItems_GetBitmapJpg_Success()
Assert.NotSame(items, bitmap.PropertyItems);
}

[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Returns new PropertyItem[0] in .NET Framework.")]
public void PropertyItems_GetEmptyBitmapBmp_Success()
{
Expand All @@ -93,7 +93,7 @@ public void PropertyItems_GetEmptyBitmapBmp_Success()
Assert.Same(bitmap.PropertyItems, bitmap.PropertyItems);
}

[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Returns new PropertyItem[0] in .NET Framework.")]
public void PropertyItems_GetEmptyMemoryBitmap_ReturnsExpected()
{
Expand All @@ -103,7 +103,7 @@ public void PropertyItems_GetEmptyMemoryBitmap_ReturnsExpected()
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
public void GetPropertyItem_InvokeExistsBitmapBmp_Success()
{
using var bitmap = new Bitmap(Helpers.GetTestBitmapPath("nature24bits.jpg"));
Expand All @@ -114,7 +114,7 @@ public void GetPropertyItem_InvokeExistsBitmapBmp_Success()
Assert.Equal("LEAD Technologies Inc. V1.01\0", Encoding.ASCII.GetString(item.Value));
}

[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[InlineData(0)]
[InlineData(1)]
[InlineData(-1)]
Expand All @@ -124,7 +124,7 @@ public void GetPropertyItem_NoSuchPropertyItemEmptyMemoryBitmap_ThrowsArgumentEx
Assert.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(propid));
}

[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[InlineData(0)]
[InlineData(1)]
[InlineData(-1)]
Expand All @@ -135,7 +135,7 @@ public void GetPropertyItem_NoSuchPropertyItemEmptyImageBitmapBmp_ThrowsArgument
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
public void RemovePropertyItem_InvokeMemoryBitmap_Success()
{
using var source = new Bitmap(Helpers.GetTestBitmapPath("nature24bits.jpg"));
Expand Down Expand Up @@ -164,7 +164,7 @@ public void RemovePropertyItem_InvokeMemoryBitmap_Success()
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
public void RemovePropertyItem_InvokeBitmapJpg_Success()
{
using var bitmap = new Bitmap(Helpers.GetTestBitmapPath("nature24bits.jpg"));
Expand All @@ -185,7 +185,7 @@ public void RemovePropertyItem_InvokeBitmapJpg_Success()
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[InlineData(0)]
[InlineData(1)]
[InlineData(-1)]
Expand All @@ -196,7 +196,7 @@ public void RemovePropertyItem_NoSuchPropertyItemEmptyMemoryBitmap_ThrowsExterna
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[InlineData(0)]
[InlineData(1)]
[InlineData(-1)]
Expand All @@ -207,7 +207,7 @@ public void RemovePropertyItem_NoSuchPropertyItemEmptyImageBitmapBmp_ThrowsExter
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[InlineData(0)]
[InlineData(1)]
[InlineData(-1)]
Expand All @@ -226,7 +226,7 @@ public void RemovePropertyItem_NoSuchPropertyNotEmptyMemoryBitmap_ThrowsArgument
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[InlineData(0)]
[InlineData(1)]
[InlineData(-1)]
Expand All @@ -237,7 +237,7 @@ public void RemovePropertyItem_NoSuchPropertyNotEmptyBitmapJpg_ThrowsArgumentExc
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[InlineData(0)]
[InlineData(1)]
[InlineData(-1)]
Expand Down Expand Up @@ -297,7 +297,7 @@ public void SetPropertyItem_InvokeMemoryBitmap_Success(int propid)
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[InlineData(0)]
[InlineData(1)]
[InlineData(-1)]
Expand Down Expand Up @@ -440,7 +440,7 @@ public void SetPropertyItem_InvokeBitmapJpg_Success(int propid)
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[InlineData(0)]
[InlineData(1)]
[InlineData(-1)]
Expand Down Expand Up @@ -510,7 +510,7 @@ public static IEnumerable<object[]> InvalidBytes_TestData()
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[MemberData(nameof(InvalidBytes_TestData))]
public void FromFile_InvalidBytes_ThrowsOutOfMemoryException(byte[] bytes)
{
Expand All @@ -521,7 +521,7 @@ public void FromFile_InvalidBytes_ThrowsOutOfMemoryException(byte[] bytes)
}
}

[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
public void FromFile_NullFileName_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("path", () => Image.FromFile(null));
Expand All @@ -535,7 +535,7 @@ public void FromFile_EmptyFileName_ThrowsArgumentNullException()
AssertExtensions.Throws<ArgumentException>("path", null, () => Image.FromFile(string.Empty, useEmbeddedColorManagement: true));
}

[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
public void FromFile_LongSegment_ThrowsException()
{
// Throws PathTooLongException on Desktop and FileNotFoundException elsewhere.
Expand All @@ -557,7 +557,7 @@ public void FromFile_LongSegment_ThrowsException()
}
}

[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
public void FromFile_NoSuchFile_ThrowsFileNotFoundException()
{
Assert.Throws<FileNotFoundException>(() => Image.FromFile("NoSuchFile"));
Expand All @@ -566,7 +566,7 @@ public void FromFile_NoSuchFile_ThrowsFileNotFoundException()

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34591", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[MemberData(nameof(InvalidBytes_TestData))]
public void FromStream_InvalidBytes_ThrowsArgumentException(byte[] bytes)
{
Expand Down Expand Up @@ -665,7 +665,7 @@ public static IEnumerable<object[]> GetEncoderParameterList_ReturnsExpected_Test
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[Theory]
[MemberData(nameof(GetEncoderParameterList_ReturnsExpected_TestData))]
public void GetEncoderParameterList_ReturnsExpected(ImageFormat format, Guid[] expectedParameters)
{
Expand All @@ -688,7 +688,7 @@ public void GetEncoderParameterList_ReturnsExpected(ImageFormat format, Guid[] e
}

[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework throws ExternalException")]
[ConditionalFact(Helpers.IsDrawingSupported)]
[Fact]
public void Save_InvalidDirectory_ThrowsDirectoryNotFoundException()
{
using (var bitmap = new Bitmap(1, 1))
Expand Down