Merge in a few changes from master

This commit is contained in:
Pavel Krajcevski 2013-09-25 15:05:56 -04:00
commit ed12d53cd4
3 changed files with 18 additions and 5 deletions

View file

@ -58,6 +58,11 @@
#include <cstdio> #include <cstdio>
#include <cmath> #include <cmath>
#if _MSC_VER
# define _CRT_SECURE_NO_WARNINGS
# define snprintf _snprintf
#endif
#include "Pixel.h" #include "Pixel.h"
#include "Core/include/Image.h" #include "Core/include/Image.h"

View file

@ -101,8 +101,16 @@ IF(PVRTEXLIB_FOUND)
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCIO) TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCIO)
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCCore) TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCCore)
ADD_TEST(${TEST_NAME} IF(MSVC)
${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ADD_TEST(${TEST_NAME}
${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}
) ${CMAKE_CURRENT_BINARY_DIR}/Debug/${TEST_NAME}
)
ELSE()
ADD_TEST(${TEST_NAME}
${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}
)
ENDIF()
ENDIF(PVRTEXLIB_FOUND) ENDIF(PVRTEXLIB_FOUND)

View file

@ -96,7 +96,7 @@ class ImageTester {
uint32 *libPixels = static_cast<uint32 *>(pvrTex.getDataPtr()); uint32 *libPixels = static_cast<uint32 *>(pvrTex.getDataPtr());
for(int i = 0; i < w*h; i++) { for(uint32 i = 0; i < w*h; i++) {
EXPECT_EQ(PixelPrinter(libPixels[i]), PixelPrinter(outPixels[i])); EXPECT_EQ(PixelPrinter(libPixels[i]), PixelPrinter(outPixels[i]));
} }