Skip to content

Commit 5ab768c

Browse files
authored
Merge pull request #1455 from SixLabors/bp/xunittraits
Add xunit trait attributes to tests
2 parents 14c541c + 455088e commit 5ab768c

File tree

83 files changed

+125
-44
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+125
-44
lines changed

tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@
77

88
using SixLabors.ImageSharp.Formats.Bmp;
99
using SixLabors.ImageSharp.Memory;
10+
using SixLabors.ImageSharp.Metadata;
1011
using SixLabors.ImageSharp.PixelFormats;
1112
using SixLabors.ImageSharp.Tests.TestUtilities;
1213
using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
1314
using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs;
1415

1516
using Xunit;
1617

18+
using static SixLabors.ImageSharp.Tests.TestImages.Bmp;
19+
1720
// ReSharper disable InconsistentNaming
1821
namespace SixLabors.ImageSharp.Tests.Formats.Bmp
1922
{
20-
using SixLabors.ImageSharp.Metadata;
21-
using static TestImages.Bmp;
22-
23+
[Trait("Format", "Bmp")]
2324
public class BmpDecoderTests
2425
{
2526
public const PixelTypes CommonNonDefaultPixelTypes = PixelTypes.Rgba32 | PixelTypes.Bgra32 | PixelTypes.RgbaVector;

tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@
1111
using SixLabors.ImageSharp.Processing.Processors.Quantization;
1212
using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
1313
using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs;
14+
1415
using Xunit;
1516
using Xunit.Abstractions;
1617

18+
using static SixLabors.ImageSharp.Tests.TestImages.Bmp;
19+
1720
// ReSharper disable InconsistentNaming
1821
namespace SixLabors.ImageSharp.Tests.Formats.Bmp
1922
{
20-
using static TestImages.Bmp;
21-
23+
[Trait("Format", "Bmp")]
2224
public class BmpEncoderTests
2325
{
2426
public static readonly TheoryData<BmpBitsPerPixel> BitsPerPixel =

tests/ImageSharp.Tests/Formats/Bmp/BmpFileHeaderTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace SixLabors.ImageSharp.Tests.Formats.Bmp
99
{
10+
[Trait("Format", "Bmp")]
1011
public class BmpFileHeaderTests
1112
{
1213
[Fact]

tests/ImageSharp.Tests/Formats/Bmp/BmpMetadataTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
using System.IO;
55

66
using SixLabors.ImageSharp.Formats.Bmp;
7+
78
using Xunit;
89

10+
using static SixLabors.ImageSharp.Tests.TestImages.Bmp;
11+
912
// ReSharper disable InconsistentNaming
1013
namespace SixLabors.ImageSharp.Tests.Formats.Bmp
1114
{
12-
using static TestImages.Bmp;
13-
15+
[Trait("Format", "Bmp")]
1416
public class BmpMetadataTests
1517
{
1618
[Fact]

tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// ReSharper disable InconsistentNaming
1818
namespace SixLabors.ImageSharp.Tests.Formats.Gif
1919
{
20+
[Trait("Format", "Gif")]
2021
public class GifDecoderTests
2122
{
2223
private const PixelTypes TestPixelTypes = PixelTypes.Rgba32 | PixelTypes.RgbaVector | PixelTypes.Argb32;

tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
// Licensed under the Apache License, Version 2.0.
33

44
using System.IO;
5-
using SixLabors.ImageSharp.Formats;
5+
66
using SixLabors.ImageSharp.Formats.Gif;
77
using SixLabors.ImageSharp.Metadata;
88
using SixLabors.ImageSharp.PixelFormats;
99
using SixLabors.ImageSharp.Processing.Processors.Quantization;
1010
using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
11+
1112
using Xunit;
1213

1314
// ReSharper disable InconsistentNaming
1415
namespace SixLabors.ImageSharp.Tests.Formats.Gif
1516
{
17+
[Trait("Format", "Gif")]
1618
public class GifEncoderTests
1719
{
1820
private const PixelTypes TestPixelTypes = PixelTypes.Rgba32 | PixelTypes.RgbaVector | PixelTypes.Argb32;

tests/ImageSharp.Tests/Formats/Gif/GifFrameMetadataTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace SixLabors.ImageSharp.Tests.Formats.Gif
88
{
9+
[Trait("Format", "Gif")]
910
public class GifFrameMetadataTests
1011
{
1112
[Fact]

tests/ImageSharp.Tests/Formats/Gif/GifMetadataTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
namespace SixLabors.ImageSharp.Tests.Formats.Gif
1515
{
16+
[Trait("Format", "Gif")]
1617
public class GifMetadataTests
1718
{
1819
public static readonly TheoryData<string, int, int, PixelResolutionUnit> RatioFiles =

tests/ImageSharp.Tests/Formats/Jpg/AdobeMarkerTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Six Labors.
1+
// Copyright (c) Six Labors.
22
// Licensed under the Apache License, Version 2.0.
33

44
using SixLabors.ImageSharp.Formats.Jpeg;
@@ -8,6 +8,7 @@
88

99
namespace SixLabors.ImageSharp.Tests.Formats.Jpg
1010
{
11+
[Trait("Format", "Jpg")]
1112
public class AdobeMarkerTests
1213
{
1314
// Taken from actual test image
@@ -79,4 +80,4 @@ public void MarkerHashCodeIsUnique()
7980
Assert.False(marker.GetHashCode().Equals(marker2.GetHashCode()));
8081
}
8182
}
82-
}
83+
}

tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.CopyToBufferArea.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ReSharper disable InconsistentNaming
1414
namespace SixLabors.ImageSharp.Tests.Formats.Jpg
1515
{
16+
[Trait("Format", "Jpg")]
1617
public partial class Block8x8FTests
1718
{
1819
public class CopyToBufferArea : JpegFixture

0 commit comments

Comments
 (0)