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

Unified Diff: media/filters/vp8_bool_decoder_unittest.cc

Issue 1170763003: vs2015: avoid warning in media/filters/vp8_bool_decoder_unittest.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-variadic
Patch Set: range assertion Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vp8_bool_decoder_unittest.cc
diff --git a/media/filters/vp8_bool_decoder_unittest.cc b/media/filters/vp8_bool_decoder_unittest.cc
index 83fdfbce83d477de15b7e789087017a594493876..4c74182805eee92d4078fa45f82cd0ebabcadb1f 100644
--- a/media/filters/vp8_bool_decoder_unittest.cc
+++ b/media/filters/vp8_bool_decoder_unittest.cc
@@ -3,6 +3,9 @@
// found in the LICENSE file.
#include "media/filters/vp8_bool_decoder.h"
+
+#include <limits>
+
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
@@ -110,7 +113,8 @@ TEST_F(Vp8BoolDecoderTest, DecodeBoolsWithParitiesAndIncreasingProbabilities) {
for (size_t i = 0; i < NUM_BITS_TO_TEST; ++i) {
bool out = !(i & 1);
- ASSERT_TRUE(bd_.ReadBool(&out, static_cast<int>(i)));
+ ASSERT_LE(i, std::numeric_limits<uint8_t>::max());
+ ASSERT_TRUE(bd_.ReadBool(&out, static_cast<uint8_t>(i)));
EXPECT_EQ(out, !!(i & 1));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698