chromium/third_party/libaom/source/libaom/test/av1_key_value_api_test.cc

/*
 * Copyright (c) 2021, Alliance for Open Media. All rights reserved.
 *
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 */

#include <cstring>
#include <tuple>

#include "aom/aom_codec.h"
#include "aom/aom_decoder.h"
#include "aom/aom_encoder.h"
#include "aom/aomcx.h"
#include "aom/aomdx.h"
#include "config/aom_config.h"
#include "gtest/gtest.h"

namespace {
KeyValParam;

class BaseKeyValAPI : public testing::Test {};

// Tests on encoder options.
// Need to add ones for the decoder in the future if it is also supported in the
// key & value API.
#if CONFIG_AV1_ENCODER
class EncValidTest : public BaseKeyValAPI,
                     public testing::WithParamInterface<KeyValParam> {};
class EncInvalidTest : public BaseKeyValAPI,
                       public testing::WithParamInterface<KeyValParam> {};

TEST_P(EncValidTest, Valid) {}

TEST_P(EncInvalidTest, NullArg) {}

TEST_P(EncInvalidTest, InvalidParam) {}

// No test for ratio / list for now since the API does not support any of the
// parameters of these type.
// The string type typically involves reading a path/file, which brings
// potential fails.
const KeyValParam enc_valid_params[] =;

const KeyValParam enc_invalid_params[] =;

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();
#endif  // CONFIG_AV1_ENCODER

}  // namespace