Remove the useless ACMTest base class

Bug: webrtc:8396
Change-Id: I021a2429910b21ffe4829e0ed51b9290bc715c0c
Reviewed-on: https://webrtc-review.googlesource.com/102884
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24907}
This commit is contained in:
Karl Wiberg
2018-10-01 12:31:22 +02:00
committed by Commit Bot
parent 4f340fa01e
commit 3ff52ffa22
11 changed files with 14 additions and 46 deletions

View File

@ -1292,7 +1292,6 @@ if (rtc_include_tests) {
visibility += webrtc_default_visibility
sources = [
"test/ACMTest.h",
"test/Channel.cc",
"test/Channel.h",
"test/EncodeDecodeTest.cc",

View File

@ -1,21 +0,0 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef MODULES_AUDIO_CODING_TEST_ACMTEST_H_
#define MODULES_AUDIO_CODING_TEST_ACMTEST_H_
class ACMTest {
public:
ACMTest() {}
virtual ~ACMTest() {}
virtual void Perform() = 0;
};
#endif // MODULES_AUDIO_CODING_TEST_ACMTEST_H_

View File

@ -15,7 +15,6 @@
#include <string.h>
#include "modules/audio_coding/include/audio_coding_module.h"
#include "modules/audio_coding/test/ACMTest.h"
#include "modules/audio_coding/test/PCMFile.h"
#include "modules/audio_coding/test/RTPFile.h"
#include "modules/include/module_common_types.h"
@ -95,10 +94,10 @@ class Receiver {
uint32_t _nextTime;
};
class EncodeDecodeTest : public ACMTest {
class EncodeDecodeTest {
public:
explicit EncodeDecodeTest(int test_mode);
void Perform() override;
void Perform();
uint16_t _playoutFreq;

View File

@ -53,7 +53,7 @@ class SenderWithFEC : public Sender {
int expected_loss_rate_;
};
class PacketLossTest : public ACMTest {
class PacketLossTest {
public:
PacketLossTest(int channels,
int expected_loss_rate_,

View File

@ -13,7 +13,6 @@
#include <memory>
#include "modules/audio_coding/test/ACMTest.h"
#include "modules/audio_coding/test/Channel.h"
#include "modules/audio_coding/test/PCMFile.h"
@ -47,12 +46,12 @@ class TestPack : public AudioPacketizationCallback {
size_t payload_size_;
};
class TestAllCodecs : public ACMTest {
class TestAllCodecs {
public:
explicit TestAllCodecs(int test_mode);
~TestAllCodecs();
void Perform() override;
void Perform();
private:
// The default value of '-1' indicates that the registration is based only on

View File

@ -14,13 +14,12 @@
#include <memory>
#include <string>
#include "modules/audio_coding/test/ACMTest.h"
#include "modules/audio_coding/test/Channel.h"
#include "modules/audio_coding/test/PCMFile.h"
namespace webrtc {
class TestRedFec : public ACMTest {
class TestRedFec {
public:
explicit TestRedFec();
~TestRedFec();

View File

@ -15,7 +15,6 @@
#include <memory>
#include "modules/audio_coding/test/ACMTest.h"
#include "modules/audio_coding/test/Channel.h"
#include "modules/audio_coding/test/PCMFile.h"
@ -57,12 +56,12 @@ class TestPackStereo : public AudioPacketizationCallback {
bool lost_packet_;
};
class TestStereo : public ACMTest {
class TestStereo {
public:
explicit TestStereo(int test_mode);
~TestStereo();
void Perform() override;
void Perform();
private:
// The default value of '-1' indicates that the registration is based only on

View File

@ -16,7 +16,6 @@
#include "common_types.h" // NOLINT(build/include)
#include "modules/audio_coding/include/audio_coding_module.h"
#include "modules/audio_coding/include/audio_coding_module_typedefs.h"
#include "modules/audio_coding/test/ACMTest.h"
#include "modules/audio_coding/test/Channel.h"
namespace webrtc {
@ -42,14 +41,12 @@ class ActivityMonitor : public ACMVADCallback {
// an audio file and check if the occurrence of various packet types follows
// expectation. TestVadDtx needs its derived class to implement the Perform()
// to put the test together.
class TestVadDtx : public ACMTest {
class TestVadDtx {
public:
static const int kOutputFreqHz = 16000;
TestVadDtx();
virtual void Perform() = 0;
protected:
void RegisterCodec(CodecInst codec_param);
@ -84,7 +81,7 @@ class TestWebRtcVadDtx final : public TestVadDtx {
public:
TestWebRtcVadDtx();
void Perform() override;
void Perform();
private:
void RunTestCases();
@ -99,7 +96,7 @@ class TestWebRtcVadDtx final : public TestVadDtx {
// TestOpusDtx is to verify that the Opus DTX performs as it should.
class TestOpusDtx final : public TestVadDtx {
public:
void Perform() override;
void Perform();
};
} // namespace webrtc

View File

@ -16,14 +16,13 @@
#include "api/audio_codecs/audio_encoder_factory.h"
#include "api/audio_codecs/audio_format.h"
#include "modules/audio_coding/include/audio_coding_module.h"
#include "modules/audio_coding/test/ACMTest.h"
#include "modules/audio_coding/test/Channel.h"
#include "modules/audio_coding/test/PCMFile.h"
#include "modules/audio_coding/test/utility.h"
namespace webrtc {
class TwoWayCommunication : public ACMTest {
class TwoWayCommunication {
public:
TwoWayCommunication();
~TwoWayCommunication();

View File

@ -17,7 +17,6 @@
#include "common_types.h" // NOLINT(build/include)
#include "modules/audio_coding/include/audio_coding_module.h"
#include "modules/audio_coding/test/ACMTest.h"
#include "modules/audio_coding/test/Channel.h"
#include "modules/audio_coding/test/PCMFile.h"
#include "modules/audio_coding/test/utility.h"
@ -36,7 +35,7 @@ struct ACMTestISACConfig {
bool enforceFrameSize;
};
class ISACTest : public ACMTest {
class ISACTest {
public:
explicit ISACTest(int testMode);
~ISACTest();

View File

@ -17,14 +17,13 @@
#include "modules/audio_coding/acm2/acm_resampler.h"
#include "modules/audio_coding/codecs/opus/opus_interface.h"
#include "modules/audio_coding/test/ACMTest.h"
#include "modules/audio_coding/test/Channel.h"
#include "modules/audio_coding/test/PCMFile.h"
#include "modules/audio_coding/test/TestStereo.h"
namespace webrtc {
class OpusTest : public ACMTest {
class OpusTest {
public:
OpusTest();
~OpusTest();