Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc

Issue 2808053002: Conversational Speech tool completed (Closed)
Patch Set: output for the user added Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc
diff --git a/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc b/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc
index fa5857270774e313b4fb5a86edfc703b5310744c..7f7e63127bfdf516e488772b5a5929b341bca150 100644
--- a/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc
+++ b/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc
@@ -12,7 +12,7 @@
// members. Part of them focus on accepting or rejecting different
// conversational speech setups. A setup is defined by a set of audio tracks and
// timing information).
-// The docstring at the beginning of each TEST_F(ConversationalSpeechTest,
+// The docstring at the beginning of each TEST(ConversationalSpeechTest,
// MultiEndCallSetup*) function looks like the drawing below and indicates which
// setup is tested.
//
@@ -156,16 +156,7 @@ void CheckAudioTrackParams(const WavReaderFactory& wav_reader_factory,
using testing::_;
-// TODO(alessiob): Remove fixture once conversational_speech fully implemented
-// and replace TEST_F with TEST.
-class ConversationalSpeechTest : public testing::Test {
- public:
- ConversationalSpeechTest() {
- rtc::LogMessage::LogToDebug(rtc::LS_VERBOSE);
- }
-};
-
-TEST_F(ConversationalSpeechTest, Settings) {
+TEST(ConversationalSpeechTest, Settings) {
const conversational_speech::Config config(
audiotracks_path, timing_filepath, output_path);
@@ -175,7 +166,7 @@ TEST_F(ConversationalSpeechTest, Settings) {
EXPECT_EQ(output_path, config.output_path());
}
-TEST_F(ConversationalSpeechTest, TimingSaveLoad) {
+TEST(ConversationalSpeechTest, TimingSaveLoad) {
// Save test timing.
const std::string temporary_filepath = webrtc::test::TempFilename(
webrtc::test::OutputPath(), "TempTimingTestFile");
@@ -195,7 +186,7 @@ TEST_F(ConversationalSpeechTest, TimingSaveLoad) {
}
}
-TEST_F(ConversationalSpeechTest, MultiEndCallCreate) {
+TEST(ConversationalSpeechTest, MultiEndCallCreate) {
auto mock_wavreader_factory = CreateMockWavReaderFactory();
// There are 5 unique audio tracks to read.
@@ -212,7 +203,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallCreate) {
EXPECT_EQ(6u, multiend_call.speaking_turns().size());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupDifferentSampleRates) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupDifferentSampleRates) {
const std::vector<Turn> timing = {
{"A", "sr8000", 0},
{"B", "sr16000", 0},
@@ -227,7 +218,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupDifferentSampleRates) {
EXPECT_FALSE(multiend_call.valid());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupMultipleChannels) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupMultipleChannels) {
const std::vector<Turn> timing = {
{"A", "sr16000_stereo", 0},
{"B", "sr16000_stereo", 0},
@@ -242,7 +233,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupMultipleChannels) {
EXPECT_FALSE(multiend_call.valid());
}
-TEST_F(ConversationalSpeechTest,
+TEST(ConversationalSpeechTest,
MultiEndCallSetupDifferentSampleRatesAndMultipleNumChannels) {
const std::vector<Turn> timing = {
{"A", "sr8000", 0},
@@ -258,7 +249,7 @@ TEST_F(ConversationalSpeechTest,
EXPECT_FALSE(multiend_call.valid());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupFirstOffsetNegative) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupFirstOffsetNegative) {
const std::vector<Turn> timing = {
{"A", "t500", -100},
{"B", "t500", 0},
@@ -273,7 +264,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupFirstOffsetNegative) {
EXPECT_FALSE(multiend_call.valid());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupSimple) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupSimple) {
// Accept:
// A 0****.....
// B .....1****
@@ -298,7 +289,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupSimple) {
EXPECT_EQ(expected_duration, multiend_call.total_duration_samples());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupPause) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupPause) {
// Accept:
// A 0****.......
// B .......1****
@@ -323,7 +314,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupPause) {
EXPECT_EQ(expected_duration, multiend_call.total_duration_samples());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalk) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupCrossTalk) {
// Accept:
// A 0****....
// B ....1****
@@ -348,7 +339,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalk) {
EXPECT_EQ(expected_duration, multiend_call.total_duration_samples());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupInvalidOrder) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupInvalidOrder) {
// Reject:
// A ..0****
// B .1****. The n-th turn cannot start before the (n-1)-th one.
@@ -366,7 +357,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupInvalidOrder) {
EXPECT_FALSE(multiend_call.valid());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalkThree) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupCrossTalkThree) {
// Accept:
// A 0****2****...
// B ...1*********
@@ -392,7 +383,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalkThree) {
EXPECT_EQ(expected_duration, multiend_call.total_duration_samples());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupSelfCrossTalkNearInvalid) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupSelfCrossTalkNearInvalid) {
// Reject:
// A 0****......
// A ...1****...
@@ -413,7 +404,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupSelfCrossTalkNearInvalid) {
EXPECT_FALSE(multiend_call.valid());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupSelfCrossTalkFarInvalid) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupSelfCrossTalkFarInvalid) {
// Reject:
// A 0*********
// B 1**.......
@@ -436,7 +427,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupSelfCrossTalkFarInvalid) {
EXPECT_FALSE(multiend_call.valid());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalkMiddleValid) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupCrossTalkMiddleValid) {
// Accept:
// A 0*********..
// B ..1****.....
@@ -463,7 +454,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalkMiddleValid) {
EXPECT_EQ(expected_duration, multiend_call.total_duration_samples());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalkMiddleInvalid) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupCrossTalkMiddleInvalid) {
// Reject:
// A 0*********
// B ..1****...
@@ -485,7 +476,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalkMiddleInvalid) {
EXPECT_FALSE(multiend_call.valid());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalkMiddleAndPause) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupCrossTalkMiddleAndPause) {
// Accept:
// A 0*********..
// B .2****......
@@ -512,7 +503,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalkMiddleAndPause) {
EXPECT_EQ(expected_duration, multiend_call.total_duration_samples());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalkFullOverlapValid) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupCrossTalkFullOverlapValid) {
// Accept:
// A 0****
// B 1****
@@ -535,7 +526,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupCrossTalkFullOverlapValid) {
EXPECT_EQ(2u, multiend_call.speaking_turns().size());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupLongSequence) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupLongSequence) {
// Accept:
// A 0****....3****.5**.
// B .....1****...4**...
@@ -568,7 +559,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupLongSequence) {
EXPECT_EQ(expected_duration, multiend_call.total_duration_samples());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSetupLongSequenceInvalid) {
+TEST(ConversationalSpeechTest, MultiEndCallSetupLongSequenceInvalid) {
// Reject:
// A 0****....3****.6**
// B .....1****...4**..
@@ -596,7 +587,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallSetupLongSequenceInvalid) {
EXPECT_FALSE(multiend_call.valid());
}
-TEST_F(ConversationalSpeechTest, MultiEndCallWavReaderAdaptorSine) {
+TEST(ConversationalSpeechTest, MultiEndCallWavReaderAdaptorSine) {
// Parameters with which wav files are created.
constexpr int duration_seconds = 5;
const int sample_rates[] = {8000, 11025, 16000, 22050, 32000, 44100, 48000};
@@ -623,7 +614,7 @@ TEST_F(ConversationalSpeechTest, MultiEndCallWavReaderAdaptorSine) {
}
}
-TEST_F(ConversationalSpeechTest, MultiEndCallSimulator) {
+TEST(ConversationalSpeechTest, MultiEndCallSimulator) {
// Simulated call (one character corresponding to 500 ms):
// A 0*********...........2*********.....
// B ...........1*********.....3*********

Powered by Google App Engine
This is Rietveld 408576698