#include "modules/audio_processing/agc2/speech_probability_buffer.h"
#include <algorithm>
#include "test/gtest.h"
namespace webrtc {
namespace {
constexpr float kAbsError = …;
constexpr float kActivityThreshold = …;
constexpr float kLowProbabilityThreshold = …;
constexpr int kNumAnalysisFrames = …;
}
TEST(SpeechProbabilityBufferTest, CheckSumAfterInitialization) { … }
TEST(SpeechProbabilityBufferTest, CheckSumAfterUpdate) { … }
TEST(SpeechProbabilityBufferTest, CheckSumAfterReset) { … }
TEST(SpeechProbabilityBufferTest, CheckSumAfterTransientNotRemoved) { … }
TEST(SpeechProbabilityBufferTest, CheckSumAfterTransientRemoved) { … }
TEST(SpeechProbabilityBufferTest, CheckSegmentIsNotActiveAfterNoUpdates) { … }
TEST(SpeechProbabilityBufferTest, CheckSegmentIsActiveChangesFromFalseToTrue) { … }
TEST(SpeechProbabilityBufferTest, CheckSegmentIsActiveChangesFromTrueToFalse) { … }
TEST(SpeechProbabilityBufferTest,
CheckSegmentIsActiveAfterUpdatesWithHighProbabilities) { … }
TEST(SpeechProbabilityBufferTest,
CheckSegmentIsNotActiveAfterUpdatesWithLowProbabilities) { … }
TEST(SpeechProbabilityBufferTest, CheckSegmentIsActiveAfterBufferIsFull) { … }
TEST(SpeechProbabilityBufferTest, CheckSegmentIsNotActiveAfterBufferIsFull) { … }
TEST(SpeechProbabilityBufferTest, CheckSegmentIsNotActiveAfterReset) { … }
TEST(SpeechProbabilityBufferTest,
CheckSegmentIsNotActiveAfterTransientRemovedAfterFewUpdates) { … }
TEST(SpeechProbabilityBufferTest,
CheckSegmentIsActiveAfterTransientNotRemoved) { … }
TEST(SpeechProbabilityBufferTest,
CheckSegmentIsNotActiveAfterTransientNotRemoved) { … }
TEST(SpeechProbabilityBufferTest,
CheckSegmentIsNotActiveAfterTransientRemoved) { … }
TEST(SpeechProbabilityBufferTest, CheckSegmentIsActiveAfterTransientRemoved) { … }
}