Chromium Code Reviews| Index: webrtc/modules/audio_coding/neteq/neteq_unittest.cc |
| diff --git a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc |
| index 340cf581b6d80ec57516786b0b96ebaa62eb129b..00a878c890f4637e6c85ecd3930bb00d2e56a46e 100644 |
| --- a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc |
| +++ b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc |
| @@ -1522,9 +1522,9 @@ void NetEqDecodingTest::DuplicateCng() { |
| } |
| uint32_t NetEqDecodingTest::PlayoutTimestamp() { |
| - uint32_t playout_timestamp = 0; |
| - EXPECT_TRUE(neteq_->GetPlayoutTimestamp(&playout_timestamp)); |
| - return playout_timestamp; |
| + rtc::Optional<uint32_t> playout_timestamp = neteq_->GetPlayoutTimestamp(); |
| + EXPECT_TRUE(playout_timestamp); |
| + return playout_timestamp.value_or(0); |
|
the sun
2016/04/06 08:04:24
Why value_or() when you already expect the optiona
hlundin-webrtc
2016/04/06 08:15:48
EXPECT does not inhibit the execution of the test,
|
| } |
| TEST_F(NetEqDecodingTest, DiscardDuplicateCng) { DuplicateCng(); } |
| @@ -1570,5 +1570,4 @@ TEST_F(NetEqDecodingTest, CngFirst) { |
| // Verify speech output. |
| EXPECT_EQ(AudioFrame::kNormalSpeech, out_frame_.speech_type_); |
| } |
| - |
| } // namespace webrtc |