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

Unified Diff: media/cast/net/frame_id_wrap_helper_test.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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: media/cast/net/frame_id_wrap_helper_test.cc
diff --git a/media/cast/net/frame_id_wrap_helper_test.cc b/media/cast/net/frame_id_wrap_helper_test.cc
index 9be52bd4334e0104511f7c39ba8a17dc08c69ddb..5ffeb224c0f3bf81d28d165a54ac3f2152554163 100644
--- a/media/cast/net/frame_id_wrap_helper_test.cc
+++ b/media/cast/net/frame_id_wrap_helper_test.cc
@@ -14,16 +14,16 @@ class FrameIdWrapHelperTest : public ::testing::Test {
FrameIdWrapHelperTest() : frame_id_wrap_helper_(kFirstFrameId - 1) {}
~FrameIdWrapHelperTest() override {}
- void RunOneTest(uint32 starting_point, int iterations) {
+ void RunOneTest(uint32_t starting_point, int iterations) {
const int window_size = 127;
- uint32 window_base = starting_point;
+ uint32_t window_base = starting_point;
frame_id_wrap_helper_.largest_frame_id_seen_ = starting_point;
for (int i = 0; i < iterations; i++) {
- uint32 largest_frame_id_seen =
+ uint32_t largest_frame_id_seen =
frame_id_wrap_helper_.largest_frame_id_seen_;
int offset = rand() % window_size;
- uint32 frame_id = window_base + offset;
- uint32 mapped_frame_id =
+ uint32_t frame_id = window_base + offset;
+ uint32_t mapped_frame_id =
frame_id_wrap_helper_.MapTo32bitsFrameId(frame_id & 0xff);
EXPECT_EQ(frame_id, mapped_frame_id)
<< " Largest ID seen: " << largest_frame_id_seen
@@ -46,19 +46,19 @@ TEST_F(FrameIdWrapHelperTest, FirstFrame) {
}
TEST_F(FrameIdWrapHelperTest, Rollover) {
- uint32 new_frame_id = 0u;
+ uint32_t new_frame_id = 0u;
for (int i = 0; i <= 256; ++i) {
new_frame_id =
- frame_id_wrap_helper_.MapTo32bitsFrameId(static_cast<uint8>(i));
+ frame_id_wrap_helper_.MapTo32bitsFrameId(static_cast<uint8_t>(i));
}
EXPECT_EQ(256u, new_frame_id);
}
TEST_F(FrameIdWrapHelperTest, OutOfOrder) {
- uint32 new_frame_id = 0u;
+ uint32_t new_frame_id = 0u;
for (int i = 0; i < 255; ++i) {
new_frame_id =
- frame_id_wrap_helper_.MapTo32bitsFrameId(static_cast<uint8>(i));
+ frame_id_wrap_helper_.MapTo32bitsFrameId(static_cast<uint8_t>(i));
}
EXPECT_EQ(254u, new_frame_id);
new_frame_id = frame_id_wrap_helper_.MapTo32bitsFrameId(0u);

Powered by Google App Engine
This is Rietveld 408576698