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

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: 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..2c5cc1ed1de38c1d4323fa6ff4172ac793f598bb 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, HigherCaseHexNumber) {
+ EXPECT_TRUE(IsHigherCaseHexNumber("1234567890"));
+ EXPECT_TRUE(IsHigherCaseHexNumber("ABDCEF"));
+ EXPECT_TRUE(IsHigherCaseHexNumber("1A2B3C"));
+
+ EXPECT_FALSE(IsHigherCaseHexNumber(""));
+ EXPECT_FALSE(IsHigherCaseHexNumber("1a2b3c"));
+ EXPECT_FALSE(IsHigherCaseHexNumber("abcdef"));
+ EXPECT_FALSE(IsHigherCaseHexNumber("GHIJKL"));
+ EXPECT_FALSE(IsHigherCaseHexNumber("!@#$^&*|"));
+}
+
// 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