mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-08 06:15:31 +00:00
Respect the new flag in tests. Fixes #12
This commit is contained in:
parent
e59541e30a
commit
502c15ee29
|
@ -56,6 +56,11 @@ INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/PVRTCEncoder/src)
|
||||||
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include )
|
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include )
|
||||||
INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/Base/include )
|
INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/Base/include )
|
||||||
|
|
||||||
|
IF( DEBUG_PVRTC_DECODER )
|
||||||
|
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Core/include )
|
||||||
|
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/IO/include )
|
||||||
|
ENDIF( DEBUG_PVRTC_DECODER )
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/GTest/include)
|
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/GTest/include)
|
||||||
|
|
||||||
SET(TESTS
|
SET(TESTS
|
||||||
|
|
|
@ -60,12 +60,10 @@
|
||||||
|
|
||||||
#include "TestUtils.h"
|
#include "TestUtils.h"
|
||||||
|
|
||||||
// #define OUTPUT_DEBUG_IMAGE
|
#ifdef DEBUG_PVRTC_DECODER
|
||||||
|
# include "Image.h"
|
||||||
#ifdef OUTPUT_DEBUG_IMAGE
|
# include "ImageFile.h"
|
||||||
# include "Core/include/Image.h"
|
#endif // DEBUG_PVRTC_DECODER
|
||||||
# include "IO/include/ImageFile.h"
|
|
||||||
#endif // OUTPUT_DEBUG_IMAGE
|
|
||||||
|
|
||||||
class ImageTester {
|
class ImageTester {
|
||||||
public:
|
public:
|
||||||
|
@ -88,7 +86,7 @@ class ImageTester {
|
||||||
|
|
||||||
uint8 *outBuf = reinterpret_cast<uint8 *>(outPixels);
|
uint8 *outBuf = reinterpret_cast<uint8 *>(outPixels);
|
||||||
FasTC::DecompressionJob dcj(fmt, data, outBuf, w, h);
|
FasTC::DecompressionJob dcj(fmt, data, outBuf, w, h);
|
||||||
#ifdef OUTPUT_DEBUG_IMAGE
|
#ifdef DEBUG_PVRTC_DECODER
|
||||||
PVRTCC::Decompress(dcj, PVRTCC::eWrapMode_Wrap, true);
|
PVRTCC::Decompress(dcj, PVRTCC::eWrapMode_Wrap, true);
|
||||||
#else
|
#else
|
||||||
PVRTCC::Decompress(dcj, PVRTCC::eWrapMode_Wrap);
|
PVRTCC::Decompress(dcj, PVRTCC::eWrapMode_Wrap);
|
||||||
|
@ -106,10 +104,10 @@ class ImageTester {
|
||||||
EXPECT_EQ(PixelPrinter(libPixels[i]), PixelPrinter(outPixels[i]));
|
EXPECT_EQ(PixelPrinter(libPixels[i]), PixelPrinter(outPixels[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OUTPUT_DEBUG_IMAGE
|
#ifdef DEBUG_PVRTC_DECODER
|
||||||
char dbgfname[256];
|
char dbgfname[256];
|
||||||
snprintf(dbgfname, sizeof(dbgfname), "Debug%s.png", filename);
|
snprintf(dbgfname, sizeof(dbgfname), "Debug%s.png", filename);
|
||||||
::ImageFile imgFile(dbgfname, eFileFormat_PNG, ::Image(w, h, outPixels));
|
ImageFile imgFile(dbgfname, eFileFormat_PNG, FasTC::Image<>(w, h, outPixels));
|
||||||
imgFile.Write();
|
imgFile.Write();
|
||||||
#endif // OUTPUT_DEBUG_IMAGE
|
#endif // OUTPUT_DEBUG_IMAGE
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue