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

Unified Diff: net/der/input_unittest.cc

Issue 1146283004: Add a template-specialized constructor for der::Input for constants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« net/der/input.h ('K') | « net/der/input.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/der/input_unittest.cc
diff --git a/net/der/input_unittest.cc b/net/der/input_unittest.cc
index e8145b54dbd85ab1f667527ebba3ee2073b9510a..dc58d4b0d0399094584254b06c1c84713b057f70 100644
--- a/net/der/input_unittest.cc
+++ b/net/der/input_unittest.cc
@@ -27,6 +27,14 @@ TEST(InputTest, Equals) {
EXPECT_FALSE(test_truncated.Equals(test));
}
+TEST(InputTest, StaticArray) {
+ Input input(kInput);
+ EXPECT_EQ(arraysize(kInput), input.Length());
+
+ Input input2(kInput, arraysize(kInput));
+ EXPECT_TRUE(input.Equals(input2));
+}
+
TEST(ByteReaderTest, NoReadPastEnd) {
ByteReader reader(Input(nullptr, 0));
uint8_t data;
« net/der/input.h ('K') | « net/der/input.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698