diff --git a/PVRTCEncoder/test/CMakeLists.txt b/PVRTCEncoder/test/CMakeLists.txt index 9d66cf5..5dd45b4 100644 --- a/PVRTCEncoder/test/CMakeLists.txt +++ b/PVRTCEncoder/test/CMakeLists.txt @@ -76,7 +76,8 @@ IF(PVRTEXLIB_FOUND) # Copy the .pvr files that we will use for testing... SET(TEST_IMAGES - gradient white gray transparent trans-gradient + 4bpp-gradient 4bpp-white 4bpp-gray 4bpp-transparent 4bpp-trans-gradient + 2bpp-gradient 2bpp-white 2bpp-gray 2bpp-transparent 2bpp-trans-gradient ) FOREACH(IMAGE ${TEST_IMAGES}) FILE(COPY diff --git a/PVRTCEncoder/test/DecompTestPVR.cpp b/PVRTCEncoder/test/DecompTestPVR.cpp index 1031c26..6ac498a 100644 --- a/PVRTCEncoder/test/DecompTestPVR.cpp +++ b/PVRTCEncoder/test/DecompTestPVR.cpp @@ -69,7 +69,7 @@ class ImageTester { public: - explicit ImageTester(const char *filename) { + explicit ImageTester(const char *filename, bool twobpp) { pvrtexture::CPVRTexture pvrTex(filename); const uint8 *data = static_cast(pvrTex.getDataPtr()); @@ -107,23 +107,42 @@ class ImageTester { } }; -TEST(Decompressor, DecompressGradient) { - ImageTester("gradient.pvr"); +TEST(Decompressor, DecompressWhite2BPP) { + ImageTester("2bpp-white.pvr", true); } -TEST(Decompressor, DecompressWhite) { - ImageTester("white.pvr"); +TEST(Decompressor, DecompressGray2BPP) { + ImageTester("2bpp-gray.pvr", true); } -TEST(Decompressor, DecompressGray) { - ImageTester("gray.pvr"); +TEST(Decompressor, DecompressGradient2BPP) { + ImageTester("2bpp-gradient.pvr", true); } -TEST(Decompressor, DecompressTransparent) { - ImageTester("transparent.pvr"); +TEST(Decompressor, DecompressTransparent2BPP) { + ImageTester("2bpp-transparent.pvr", true); } -TEST(Decompressor, DecompressTransGradient) { - ImageTester("trans-gradient.pvr"); +TEST(Decompressor, DecompressTransGradient2BPP) { + ImageTester("2bpp-trans-gradient.pvr", true); } +TEST(Decompressor, DecompressWhite4BPP) { + ImageTester("4bpp-white.pvr", false); +} + +TEST(Decompressor, DecompressGray4BPP) { + ImageTester("4bpp-gray.pvr", false); +} + +TEST(Decompressor, DecompressGradient4BPP) { + ImageTester("4bpp-gradient.pvr", false); +} + +TEST(Decompressor, DecompressTransparent4BPP) { + ImageTester("4bpp-transparent.pvr", false); +} + +TEST(Decompressor, DecompressTransGradient4BPP) { + ImageTester("4bpp-trans-gradient.pvr", false); +} diff --git a/PVRTCEncoder/test/data/2bpp-gradient.pvr b/PVRTCEncoder/test/data/2bpp-gradient.pvr new file mode 100644 index 0000000..0f7227f Binary files /dev/null and b/PVRTCEncoder/test/data/2bpp-gradient.pvr differ diff --git a/PVRTCEncoder/test/data/2bpp-gray.pvr b/PVRTCEncoder/test/data/2bpp-gray.pvr new file mode 100644 index 0000000..c26a2ee Binary files /dev/null and b/PVRTCEncoder/test/data/2bpp-gray.pvr differ diff --git a/PVRTCEncoder/test/data/2bpp-trans-gradient.pvr b/PVRTCEncoder/test/data/2bpp-trans-gradient.pvr new file mode 100644 index 0000000..adc9616 Binary files /dev/null and b/PVRTCEncoder/test/data/2bpp-trans-gradient.pvr differ diff --git a/PVRTCEncoder/test/data/2bpp-transparent.pvr b/PVRTCEncoder/test/data/2bpp-transparent.pvr new file mode 100644 index 0000000..6710e11 Binary files /dev/null and b/PVRTCEncoder/test/data/2bpp-transparent.pvr differ diff --git a/PVRTCEncoder/test/data/2bpp-white.pvr b/PVRTCEncoder/test/data/2bpp-white.pvr new file mode 100644 index 0000000..d9ce67e Binary files /dev/null and b/PVRTCEncoder/test/data/2bpp-white.pvr differ diff --git a/PVRTCEncoder/test/data/gradient.pvr b/PVRTCEncoder/test/data/4bpp-gradient.pvr similarity index 100% rename from PVRTCEncoder/test/data/gradient.pvr rename to PVRTCEncoder/test/data/4bpp-gradient.pvr diff --git a/PVRTCEncoder/test/data/gray.pvr b/PVRTCEncoder/test/data/4bpp-gray.pvr similarity index 100% rename from PVRTCEncoder/test/data/gray.pvr rename to PVRTCEncoder/test/data/4bpp-gray.pvr diff --git a/PVRTCEncoder/test/data/trans-gradient.pvr b/PVRTCEncoder/test/data/4bpp-trans-gradient.pvr similarity index 100% rename from PVRTCEncoder/test/data/trans-gradient.pvr rename to PVRTCEncoder/test/data/4bpp-trans-gradient.pvr diff --git a/PVRTCEncoder/test/data/transparent.pvr b/PVRTCEncoder/test/data/4bpp-transparent.pvr similarity index 100% rename from PVRTCEncoder/test/data/transparent.pvr rename to PVRTCEncoder/test/data/4bpp-transparent.pvr diff --git a/PVRTCEncoder/test/data/white.pvr b/PVRTCEncoder/test/data/4bpp-white.pvr similarity index 100% rename from PVRTCEncoder/test/data/white.pvr rename to PVRTCEncoder/test/data/4bpp-white.pvr