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

Side by Side Diff: media/filters/vp8_bool_decoder_unittest.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef 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 unified diff | Download patch
« no previous file with comments | « media/filters/vp8_bool_decoder.h ('k') | media/filters/vp8_parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "media/filters/vp8_bool_decoder.h" 5 #include "media/filters/vp8_bool_decoder.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include <limits> 10 #include <limits>
8 11
12 #include "base/macros.h"
9 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
10 14
11 namespace media { 15 namespace media {
12 16
13 const static size_t NUM_BITS_TO_TEST = 100; 17 const static size_t NUM_BITS_TO_TEST = 100;
14 18
15 namespace { 19 namespace {
16 20
17 // 100 zeros with probability of 0x80. 21 // 100 zeros with probability of 0x80.
18 const uint8_t kDataZerosAndEvenProbabilities[] = { 22 const uint8_t kDataZerosAndEvenProbabilities[] = {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 117
114 for (size_t i = 0; i < NUM_BITS_TO_TEST; ++i) { 118 for (size_t i = 0; i < NUM_BITS_TO_TEST; ++i) {
115 bool out = !(i & 1); 119 bool out = !(i & 1);
116 ASSERT_LE(i, std::numeric_limits<uint8_t>::max()); 120 ASSERT_LE(i, std::numeric_limits<uint8_t>::max());
117 ASSERT_TRUE(bd_.ReadBool(&out, static_cast<uint8_t>(i))); 121 ASSERT_TRUE(bd_.ReadBool(&out, static_cast<uint8_t>(i)));
118 EXPECT_EQ(out, !!(i & 1)); 122 EXPECT_EQ(out, !!(i & 1));
119 } 123 }
120 } 124 }
121 125
122 } // namespace media 126 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/vp8_bool_decoder.h ('k') | media/filters/vp8_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698