Browse Source

assertions for SolidFillBlendedShapesTests

af/merge-core
Anton Firszov 8 years ago
parent
commit
b07ad0bf49
  1. 27
      tests/ImageSharp.Tests/Drawing/SolidFillBlendedShapesTests.cs
  2. 6
      tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs
  3. 2
      tests/Images/External

27
tests/ImageSharp.Tests/Drawing/SolidFillBlendedShapesTests.cs

@ -1,20 +1,18 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Collections.Generic;
using System.Linq;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
using SixLabors.Primitives;
using Xunit;
// ReSharper disable InconsistentNaming
namespace SixLabors.ImageSharp.Tests.Drawing
{
using System;
using System.Collections.Generic;
using System.Linq;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.Primitives;
using Xunit;
[GroupOutput("Drawing")]
public class SolidFillBlendedShapesTests
{
@ -144,6 +142,13 @@ namespace SixLabors.ImageSharp.Tests.Drawing
new { mode },
appendPixelTypeToFileName: false,
appendSourceFileOrDescription: false);
var comparer = ImageComparer.TolerantPercentage(0.01f, 3);
img.CompareFirstFrameToReferenceOutput(comparer,
provider,
new { mode },
appendPixelTypeToFileName: false,
appendSourceFileOrDescription: false);
}
}
}

6
tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs

@ -213,7 +213,8 @@ namespace SixLabors.ImageSharp.Tests
object testOutputDetails = null,
string extension = "png",
bool grayscale = false,
bool appendPixelTypeToFileName = true)
bool appendPixelTypeToFileName = true,
bool appendSourceFileOrDescription = true)
where TPixel : struct, IPixel<TPixel>
{
using (var firstFrameOnlyImage = new Image<TPixel>(image.Width, image.Height))
@ -221,7 +222,8 @@ namespace SixLabors.ImageSharp.Tests
provider,
testOutputDetails,
extension,
appendPixelTypeToFileName))
appendPixelTypeToFileName,
appendSourceFileOrDescription))
{
firstFrameOnlyImage.Frames.AddFrame(image.Frames.RootFrame);
firstFrameOnlyImage.Frames.RemoveFrame(0);

2
tests/Images/External

@ -1 +1 @@
Subproject commit 558729ec87bcf52f22362175842f88a81ccfc483
Subproject commit 5a9a88380166a87521d10048f53cda7f5f761d66
Loading…
Cancel
Save