Skip to content

Commit 34ed38d

Browse files
committed
assertions for SolidFillBlendedShapesTests
1 parent 994f5fc commit 34ed38d

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

tests/ImageSharp.Tests/Drawing/SolidFillBlendedShapesTests.cs

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
// Copyright (c) Six Labors and contributors.
22
// Licensed under the Apache License, Version 2.0.
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using SixLabors.ImageSharp.PixelFormats;
7+
using SixLabors.ImageSharp.Processing;
8+
using SixLabors.ImageSharp.Processing.Drawing;
9+
using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
10+
using SixLabors.Primitives;
11+
using Xunit;
312

413
// ReSharper disable InconsistentNaming
514
namespace SixLabors.ImageSharp.Tests.Drawing
615
{
7-
using System;
8-
using System.Collections.Generic;
9-
using System.Linq;
10-
11-
using SixLabors.ImageSharp.PixelFormats;
12-
using SixLabors.ImageSharp.Processing;
13-
using SixLabors.ImageSharp.Processing.Drawing;
14-
using SixLabors.Primitives;
15-
16-
using Xunit;
17-
1816
[GroupOutput("Drawing")]
1917
public class SolidFillBlendedShapesTests
2018
{
@@ -144,6 +142,13 @@ private static void VerifyImage<TPixel>(TestImageProvider<TPixel> provider, Pixe
144142
new { mode },
145143
appendPixelTypeToFileName: false,
146144
appendSourceFileOrDescription: false);
145+
146+
var comparer = ImageComparer.TolerantPercentage(0.01f, 3);
147+
img.CompareFirstFrameToReferenceOutput(comparer,
148+
provider,
149+
new { mode },
150+
appendPixelTypeToFileName: false,
151+
appendSourceFileOrDescription: false);
147152
}
148153
}
149154
}

tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,17 @@ public static Image<TPixel> CompareFirstFrameToReferenceOutput<TPixel>(
213213
object testOutputDetails = null,
214214
string extension = "png",
215215
bool grayscale = false,
216-
bool appendPixelTypeToFileName = true)
216+
bool appendPixelTypeToFileName = true,
217+
bool appendSourceFileOrDescription = true)
217218
where TPixel : struct, IPixel<TPixel>
218219
{
219220
using (var firstFrameOnlyImage = new Image<TPixel>(image.Width, image.Height))
220221
using (Image<TPixel> referenceImage = GetReferenceOutputImage<TPixel>(
221222
provider,
222223
testOutputDetails,
223224
extension,
224-
appendPixelTypeToFileName))
225+
appendPixelTypeToFileName,
226+
appendSourceFileOrDescription))
225227
{
226228
firstFrameOnlyImage.Frames.AddFrame(image.Frames.RootFrame);
227229
firstFrameOnlyImage.Frames.RemoveFrame(0);

tests/Images/External

Submodule External updated 84 files

0 commit comments

Comments
 (0)