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

Unified Diff: net/quic/platform/api/quic_text_utils_test.cc

Issue 2616493003: Add tests for QuicTextUtils::HexEncode and HexDecode which use non-ASCII printable data. (Closed)
Patch Set: Created 3 years, 11 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: net/quic/platform/api/quic_text_utils_test.cc
diff --git a/net/quic/platform/api/quic_text_utils_test.cc b/net/quic/platform/api/quic_text_utils_test.cc
index c424a36dd7afb319c8cd5ed07f0620738ff8065f..49efeb16182f7865eddcc3559957e981cf13b79e 100644
--- a/net/quic/platform/api/quic_text_utils_test.cc
+++ b/net/quic/platform/api/quic_text_utils_test.cc
@@ -71,11 +71,13 @@ TEST(QuicTextUtilsText, HexEncode) {
EXPECT_EQ("48656c6c6f", QuicTextUtils::HexEncode("Hello", 5));
EXPECT_EQ("48656c6c6f", QuicTextUtils::HexEncode("Hello World", 5));
EXPECT_EQ("48656c6c6f", QuicTextUtils::HexEncode("Hello"));
+ EXPECT_EQ("0102779cfa", QuicTextUtils::HexEncode("\x01\x02\x77\x9c\xfa"));
}
TEST(QuicTextUtilsText, HexDecode) {
EXPECT_EQ("Hello", QuicTextUtils::HexDecode("48656c6c6f"));
EXPECT_EQ("", QuicTextUtils::HexDecode(""));
+ EXPECT_EQ("\x01\x02\x77\x9c\xfa", QuicTextUtils::HexDecode("0102779cfa"));
}
TEST(QuicTextUtilsText, HexDump) {
« 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