mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
932 B
23 lines
932 B
// 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 GifLogicalScreenDescriptorTests
|
|
{
|
|
[Fact]
|
|
public void TestPackedValue()
|
|
{
|
|
Assert.Equal(0, GifLogicalScreenDescriptor.GetPackedValue(false, 0, false, 0));
|
|
Assert.Equal(128, GifLogicalScreenDescriptor.GetPackedValue(true, 0, false, 0)); // globalColorTableFlag
|
|
Assert.Equal(8, GifLogicalScreenDescriptor.GetPackedValue(false, 0, true, 0)); // sortFlag
|
|
Assert.Equal(48, GifLogicalScreenDescriptor.GetPackedValue(false, 3, false, 0));
|
|
Assert.Equal(155, GifLogicalScreenDescriptor.GetPackedValue(true, 1, true, 3));
|
|
Assert.Equal(55, GifLogicalScreenDescriptor.GetPackedValue(false, 3, false, 7));
|
|
}
|
|
}
|
|
}
|