chromium/media/base/audio_hash_unittest.cc

// Copyright 2013 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/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include <memory>

#include "media/base/audio_bus.h"
#include "media/base/audio_hash.h"
#include "media/base/fake_audio_render_callback.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace media {

static const int kChannelCount =;
static const int kFrameCount =;
static const int kSampleRate =;

class AudioHashTest : public testing::Test {};

// Ensure the same data hashes the same.
TEST_F(AudioHashTest, Equivalence) {}

// Ensure sample order matters to the hash.
TEST_F(AudioHashTest, SampleOrder) {}

// Ensure channel order matters to the hash.
TEST_F(AudioHashTest, ChannelOrder) {}

// Ensure bus order matters to the hash.
TEST_F(AudioHashTest, BusOrder) {}

// Ensure bus order matters to the hash even with empty buses.
TEST_F(AudioHashTest, EmptyBusOrder) {}

// Where A = [0, n], ensure hash(A[0:n/2]), hash(A[n/2:n]) and hash(A) result
// in the same value.
TEST_F(AudioHashTest, HashIgnoresUpdateOrder) {}

// Ensure approximate hashes pass verification.
TEST_F(AudioHashTest, VerifySimilarHash) {}

}  // namespace media