chromium/third_party/blink/renderer/platform/audio/push_pull_fifo_test.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/platform/audio/push_pull_fifo.h"

#include <memory>
#include <vector>

#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/audio/audio_utilities.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
#include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"

namespace blink {

namespace {

// Check the basic contract of FIFO. This test only covers the single thread
// scenario.
TEST(PushPullFIFOBasicTest, BasicTests) {}

// Fills each AudioChannel in an AudioBus with a series of linearly increasing
// values starting from |starting_value| and incrementing by 1. Then return
// value will be |starting_value| + |bus_length|.
size_t FillBusWithLinearRamp(AudioBus* target_bus, size_t starting_value) {}

// Inspect the content of AudioBus with a given set of index and value across
// channels.
bool VerifyBusValueAtIndex(AudioBus* target_bus,
                           int index,
                           float expected_value) {}

struct FIFOAction {};

struct AudioBusSample {};

struct FIFOTestSetup {};

struct FIFOTestExpectedState {};

// The data structure for the parameterized test cases.
struct FIFOTestParam {};

std::ostream& operator<<(std::ostream& out, const FIFOTestParam& param) {}

class PushPullFIFOFeatureTest : public testing::TestWithParam<FIFOTestParam> {};

TEST_P(PushPullFIFOFeatureTest, FeatureTests) {}

FIFOTestParam g_feature_test_params[] =;

INSTANTIATE_TEST_SUITE_P();


struct FIFOEarmarkTestParam {};

class PushPullFIFOEarmarkFramesTest
    : public testing::TestWithParam<FIFOEarmarkTestParam> {};

TEST_P(PushPullFIFOEarmarkFramesTest, FeatureTests) {}

FIFOEarmarkTestParam g_earmark_test_params[] =;

INSTANTIATE_TEST_SUITE_P();

}  // namespace

}  // namespace blink