#include "core/fxge/dib/cstretchengine.h"
#include <utility>
#include "core/fpdfapi/page/cpdf_dib.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
#include "core/fxge/dib/fx_dib.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
constexpr uint32_t kTooBigSrcLen = …;
constexpr uint32_t kTooBigDestLen = …;
uint32_t PixelWeightSum(const CStretchEngine::PixelWeight* weights) { … }
void ExecuteOneStretchTest(int32_t dest_width,
int32_t src_width,
const FXDIB_ResampleOptions& options) { … }
void ExecuteOneReversedStretchTest(int32_t dest_width,
int32_t src_width,
const FXDIB_ResampleOptions& options) { … }
void ExecuteStretchTests(const FXDIB_ResampleOptions& options) { … }
}
TEST(CStretchEngine, OverflowInCtor) { … }
TEST(CStretchEngine, WeightRounding) { … }
TEST(CStretchEngine, WeightRoundingNoSmoothing) { … }
TEST(CStretchEngine, WeightRoundingBilinear) { … }
TEST(CStretchEngine, WeightRoundingNoSmoothingBilinear) { … }
TEST(CStretchEngine, ZeroLengthSrc) { … }
TEST(CStretchEngine, ZeroLengthSrcNoSmoothing) { … }
TEST(CStretchEngine, ZeroLengthSrcBilinear) { … }
TEST(CStretchEngine, ZeroLengthSrcNoSmoothingBilinear) { … }
TEST(CStretchEngine, ZeroLengthDest) { … }
TEST(CStretchEngine, TooManyWeights) { … }