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

Unified Diff: webrtc/modules/utility/source/audio_frame_operations_unittest.cc

Issue 2424173003: Move functionality out from AudioFrame and into AudioFrameOperations. (Closed)
Patch Set: Created 4 years, 2 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/utility/source/audio_frame_operations_unittest.cc
diff --git a/webrtc/modules/utility/source/audio_frame_operations_unittest.cc b/webrtc/modules/utility/source/audio_frame_operations_unittest.cc
index 5842b90c0a28a490e9ad7f8c2dfedade9719de56..e9943a57a4b468ddb6f064dc83dd84b159370aba 100644
--- a/webrtc/modules/utility/source/audio_frame_operations_unittest.cc
+++ b/webrtc/modules/utility/source/audio_frame_operations_unittest.cc
@@ -365,5 +365,15 @@ TEST_F(AudioFrameOperationsTest, ScaleWithSatSucceeds) {
VerifyFramesAreEqual(scaled_frame, frame_);
}
+TEST(ClampToInt16, TestCases) {
+ EXPECT_EQ(0x0000, ClampToInt16(0x00000000));
+ EXPECT_EQ(0x0001, ClampToInt16(0x00000001));
+ EXPECT_EQ(0x7FFF, ClampToInt16(0x00007FFF));
+ EXPECT_EQ(0x7FFF, ClampToInt16(0x7FFFFFFF));
+ EXPECT_EQ(-0x0001, ClampToInt16(-0x00000001));
+ EXPECT_EQ(-0x8000, ClampToInt16(-0x8000));
+ EXPECT_EQ(-0x8000, ClampToInt16(-0x7FFFFFFF));
+}
+
} // namespace
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698