Browse Source

Add GifGraphicControlExtensionTests

af/merge-core
Jason Nelson 8 years ago
parent
commit
7e446064dc
  1. 21
      tests/ImageSharp.Tests/Formats/Gif/Sections/GifGraphicControlExtensionTests.cs
  2. 1
      tests/ImageSharp.Tests/Formats/Gif/Sections/GifImageDescriptorTests.cs

21
tests/ImageSharp.Tests/Formats/Gif/Sections/GifGraphicControlExtensionTests.cs

@ -0,0 +1,21 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.Formats.Gif;
using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Gif
{
public class GifGraphicControlExtensionTests
{
[Fact]
public void TestPackedValue()
{
Assert.Equal(0, GifGraphicControlExtension.GetPackedValue(DisposalMethod.Unspecified, false, false));
Assert.Equal(11, GifGraphicControlExtension.GetPackedValue(DisposalMethod.RestoreToBackground, true, true));
Assert.Equal(4, GifGraphicControlExtension.GetPackedValue(DisposalMethod.NotDispose, false, false));
Assert.Equal(14, GifGraphicControlExtension.GetPackedValue(DisposalMethod.RestoreToPrevious, true, false));
}
}
}

1
tests/ImageSharp.Tests/Formats/Gif/Sections/GifImageDescriptorTests.cs

@ -9,7 +9,6 @@ namespace SixLabors.ImageSharp.Tests.Formats.Gif
{
public class GifImageDescriptorTests
{
[Fact]
public void TestPackedValue()
{

Loading…
Cancel
Save