#include <cstdio>
#include <cstdlib>
#include <memory>
#include <string>
#include <vector>
#include "gtest/gtest.h"
#include "./vpx_config.h"
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/ivf_video_source.h"
#include "test/util.h"
#if CONFIG_WEBM_IO
#include "test/webm_video_source.h"
#endif
#include "vpx_mem/vpx_mem.h"
namespace {
struct DecodeParam { … };
std::ostream &operator<<(std::ostream &os, const DecodeParam &dp) { … }
class InvalidFileTest : public ::libvpx_test::DecoderTest,
public ::libvpx_test::CodecTestWithParam<DecodeParam> { … };
TEST_P(InvalidFileTest, ReturnCode) { … }
#if CONFIG_VP8_DECODER
const DecodeParam kVP8InvalidFileTests[] = …;
VP8_INSTANTIATE_TEST_SUITE(…);
#endif
#if CONFIG_VP9_DECODER
const DecodeParam kVP9InvalidFileTests[] = …;
VP9_INSTANTIATE_TEST_SUITE(…);
#endif
class InvalidFileInvalidPeekTest : public InvalidFileTest { … };
TEST_P(InvalidFileInvalidPeekTest, ReturnCode) { … }
#if CONFIG_VP8_DECODER
const DecodeParam kVP8InvalidPeekTests[] = …;
VP8_INSTANTIATE_TEST_SUITE(…);
#endif
#if CONFIG_VP9_DECODER
const DecodeParam kVP9InvalidFileInvalidPeekTests[] = …;
VP9_INSTANTIATE_TEST_SUITE(…);
const DecodeParam kMultiThreadedVP9InvalidFileTests[] = …;
INSTANTIATE_TEST_SUITE_P(…);
#endif
}