mirror of
https://github.com/AssetRipper/AssetRipper.TextureDecoder.git
synced 2026-11-13 04:26:30 -10:00
18 lines
543 B
C#
18 lines
543 B
C#
namespace AssetRipper.TextureDecoder.Tests
|
|
{
|
|
public sealed class PvrtcTests
|
|
{
|
|
[Test]
|
|
public void DecompressPVRTCTest()
|
|
{
|
|
ReadOnlySpan<byte> data = File.ReadAllBytes(PathConstants.PvrtcTestFilesFolder + "test.pvrtc4");
|
|
int totalBytesRead = 0;
|
|
foreach (int size in new int[] { 512, 256, 128, 64, 32, 16, 8, 4, 2, 1 }) //mip maps
|
|
{
|
|
int bytesRead = Pvrtc.PvrtcDecoder.DecompressPVRTC(data, size, size, false, out _);
|
|
totalBytesRead += bytesRead;
|
|
}
|
|
Assert.That(totalBytesRead, Is.EqualTo(data.Length));
|
|
}
|
|
}
|
|
} |