Browse Source

test class cleanup

pull/34/head
Anton Firszov 9 years ago
parent
commit
379dbb3ed9
  1. 27
      tests/ImageSharp.Tests46/Formats/Jpg/Block8x8FTests.cs
  2. 2
      tests/ImageSharp.Tests46/Formats/Jpg/JpegTests.cs
  3. 4
      tests/ImageSharp.Tests46/Formats/Jpg/ReferenceImplementations.cs

27
tests/ImageSharp.Tests46/Formats/Jpg/Block8x8FTests.cs

@ -207,32 +207,7 @@ namespace ImageSharp.Tests.Formats.Jpg
Assert.Equal(expected, actual);
}
[Fact]
public void TransposeInto_CodeGeneratorTest()
{
char[] coordz = new[] {'X', 'Y', 'Z', 'W'};
StringBuilder bld = new StringBuilder();
for (int i = 0; i < 8; i++)
{
char destCoord = coordz[i%4];
char destSide = (i/4)%2 == 0 ? 'L' : 'R';
for (int j = 0; j < 8; j++)
{
char srcCoord = coordz[j%4];
char srcSide = (j/4)%2 == 0 ? 'L' : 'R';
string expression = $"d.V{j}{destSide}.{destCoord} = V{i}{srcSide}.{srcCoord}; ";
bld.Append(expression);
}
bld.AppendLine();
}
Output.WriteLine(bld.ToString());
}
[Fact]
public unsafe void TransposeInto_WithPointers()

2
tests/ImageSharp.Tests46/Formats/Jpg/JpegTests.cs

@ -63,7 +63,7 @@ namespace ImageSharp.Tests.Formats.Jpg
}
public static IEnumerable<object[]> AllBmpFiles
=> TestImages.Bmp.All.Select(fn => new object[] {fn});
=> TestImages.Jpeg.All.Select(fn => new object[] {fn});
[Theory]
[MemberData(nameof(AllBmpFiles))]

4
tests/ImageSharp.Tests46/Formats/Jpg/ReferenceImplementations.cs

@ -9,10 +9,10 @@ using ImageSharp.Formats;
namespace ImageSharp.Tests.Formats.Jpg
{
/// <summary>
/// This class contains simplified (unefficient) reference implementations so we can verify actual ones in unit tests
/// This class contains simplified (unefficient) reference implementations to produce verification data for unit tests
/// DCT code Ported from https://github.com/norishigefukushima/dct_simd
/// </summary>
public static class ReferenceImplementations
internal static class ReferenceImplementations
{
internal static void Transpose8x8(MutableSpan<float> data)
{

Loading…
Cancel
Save