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

Unified Diff: base/strings/string_util_unittest.cc

Issue 254983006: Fix: Adding list of supported codecs for MP4 containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding testcases for EME Created 6 years, 8 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: base/strings/string_util_unittest.cc
diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
index e447cdc39024cce1eebc3e9932a3d61602a54d3b..d7f0a65909892d18e12e66f30f2aa2dd6095c323 100644
--- a/base/strings/string_util_unittest.cc
+++ b/base/strings/string_util_unittest.cc
@@ -594,6 +594,18 @@ TEST(StringUtilTest, HexDigitToInt) {
EXPECT_EQ(15, HexDigitToInt('f'));
}
+TEST(StringUtilTest, UpperCaseHexNumber) {
+ EXPECT_TRUE(IsUpperCaseHexNumber("1234567890"));
+ EXPECT_TRUE(IsUpperCaseHexNumber("ABDCEF"));
+ EXPECT_TRUE(IsUpperCaseHexNumber("1A2B3C"));
+
+ EXPECT_FALSE(IsUpperCaseHexNumber(""));
+ EXPECT_FALSE(IsUpperCaseHexNumber("1a2b3c"));
+ EXPECT_FALSE(IsUpperCaseHexNumber("abcdef"));
+ EXPECT_FALSE(IsUpperCaseHexNumber("GHIJKL"));
+ EXPECT_FALSE(IsUpperCaseHexNumber("!@#$^&*|"));
+}
+
// This checks where we can use the assignment operator for a va_list. We need
// a way to do this since Visual C doesn't support va_copy, but assignment on
// va_list is not guaranteed to be a copy. See StringAppendVT which uses this

Powered by Google App Engine
This is Rietveld 408576698