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

Side by Side Diff: media/cast/net/frame_id_wrap_helper_test.cc

Issue 661163004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <gtest/gtest.h> 5 #include <gtest/gtest.h>
6 #include "media/cast/cast_defines.h" 6 #include "media/cast/cast_defines.h"
7 #include "media/cast/net/cast_transport_defines.h" 7 #include "media/cast/net/cast_transport_defines.h"
8 8
9 namespace media { 9 namespace media {
10 namespace cast { 10 namespace cast {
11 11
12 class FrameIdWrapHelperTest : public ::testing::Test { 12 class FrameIdWrapHelperTest : public ::testing::Test {
13 protected: 13 protected:
14 FrameIdWrapHelperTest() {} 14 FrameIdWrapHelperTest() {}
15 virtual ~FrameIdWrapHelperTest() {} 15 ~FrameIdWrapHelperTest() override {}
16 16
17 void RunOneTest(uint32 starting_point, int iterations) { 17 void RunOneTest(uint32 starting_point, int iterations) {
18 const int window_size = 127; 18 const int window_size = 127;
19 uint32 window_base = starting_point; 19 uint32 window_base = starting_point;
20 frame_id_wrap_helper_.largest_frame_id_seen_ = starting_point; 20 frame_id_wrap_helper_.largest_frame_id_seen_ = starting_point;
21 for (int i = 0; i < iterations; i++) { 21 for (int i = 0; i < iterations; i++) {
22 uint32 largest_frame_id_seen = 22 uint32 largest_frame_id_seen =
23 frame_id_wrap_helper_.largest_frame_id_seen_; 23 frame_id_wrap_helper_.largest_frame_id_seen_;
24 int offset = rand() % window_size; 24 int offset = rand() % window_size;
25 uint32 frame_id = window_base + offset; 25 uint32 frame_id = window_base + offset;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 for (int i = 0; i < 50000 && !HasFailure(); i++) { 71 for (int i = 0; i < 50000 && !HasFailure(); i++) {
72 RunOneTest(i * 4711, 20); 72 RunOneTest(i * 4711, 20);
73 // Test wrap-around scenarios. 73 // Test wrap-around scenarios.
74 RunOneTest(0x7fffff00ul, 20); 74 RunOneTest(0x7fffff00ul, 20);
75 RunOneTest(0xffffff00ul, 20); 75 RunOneTest(0xffffff00ul, 20);
76 } 76 }
77 } 77 }
78 78
79 } // namespace cast 79 } // namespace cast
80 } // namespace media 80 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/cast_transport_sender_impl_unittest.cc ('k') | media/cast/net/pacing/paced_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698