#include <gmock/gmock.h>
#include <vector>
#include "common/debug.h"
#include "common/mathutil.h"
#include "image_util/loadimage.h"
usingnamespaceangle;
usingnamespacetesting;
namespace
{
template <typename Type>
void initializeRGBInput(std::vector<Type> &rgbInput,
size_t width,
size_t height,
size_t depth,
size_t inputPixelBytes,
size_t inputByteOffset,
size_t inputRowPitch,
size_t inputDepthPitch)
{ … }
template <typename Type, uint8_t fourthValue>
void verifyRGBToRGBAResults(const char *strCase,
std::vector<Type> &rgbInput,
std::vector<Type> &rgbaOutput,
size_t width,
size_t height,
size_t depth,
size_t inputPixelBytes,
size_t inputByteOffset,
size_t inputRowPitch,
size_t inputDepthPitch,
size_t outputPixelBytes,
size_t outputByteOffset,
size_t outputRowPitch,
size_t outputDepthPitch)
{ … }
template <uint8_t fourthValue>
void TestLoadUbyteRGBToRGBA(ImageLoadContext &context,
const char *strCase,
size_t width,
size_t height,
size_t depth,
size_t inputByteOffset,
size_t outputByteOffset,
size_t inputRowAlignment)
{ … }
template <uint8_t fourthValue>
void TestLoadSbyteRGBToRGBA(ImageLoadContext &context,
const char *strCase,
size_t width,
size_t height,
size_t depth,
size_t inputByteOffset,
size_t outputByteOffset,
size_t inputRowAlignment)
{ … }
void TestLoadByteRGBToRGBAForAllCases(ImageLoadContext &context,
size_t inputCase,
size_t width,
size_t height,
size_t depth,
size_t inputByteOffset,
size_t outputByteOffset,
size_t inputRowAlignment)
{ … }
TEST(LoadToNative3To4, LoadUbyteRGBToRGBADataOnePixelWithFourthCompOfFF)
{ … }
TEST(LoadToNative3To4, LoadUbyteRGBToRGBADataOnePixelWithFourthCompOf01)
{ … }
TEST(LoadToNative3To4, LoadSbyteRGBToRGBADataOnePixelWithFourthCompOf7F)
{ … }
TEST(LoadToNative3To4, LoadSbyteRGBToRGBADataOnePixelWithFourthCompOf01)
{ … }
TEST(LoadToNative3To4, LoadUbyteRGBToRGBADataFourPixelsWithFourthCompOfFF)
{ … }
TEST(LoadToNative3To4, LoadUbyteRGBToRGBADataFourPixelsWithFourthCompOf01)
{ … }
TEST(LoadToNative3To4, LoadSbyteRGBToRGBADataFourPixelsWithFourthCompOf7F)
{ … }
TEST(LoadToNative3To4, LoadSbyteRGBToRGBADataFourPixelsWithFourthCompOf01)
{ … }
TEST(LoadToNative3To4, LoadByteRGBToRGBADataAlignedWidth)
{ … }
TEST(LoadToNative3To4, LoadByteRGBToRGBADataUnalignedWidth)
{ … }
TEST(LoadToNative3To4, LoadByteRGBToRGBADataWithDepth)
{ … }
TEST(LoadToNative3To4, LoadByteRGBToRGBADataWidthLessThanUint32)
{ … }
TEST(LoadToNative3To4, LoadByteRGBToRGBAWithAlignedWidthAndInputAddressOffset)
{ … }
TEST(LoadToNative3To4, LoadByteRGBToRGBAWithUnalignedWidthAndInputAddressOffset)
{ … }
TEST(LoadToNative3To4, LoadByteRGBToRGBAWithAlignedWidthAndOutputAddressOffset)
{ … }
TEST(LoadToNative3To4, LoadByteRGBToRGBAWithUnalignedWidthAndOutputAddressOffset)
{ … }
TEST(LoadToNative3To4, LoadByteRGBToRGBAWithAlignedWidthAndAlignment4)
{ … }
TEST(LoadToNative3To4, LoadByteRGBToRGBAWithUnalignedWidthAndAlignment4)
{ … }
}