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

Side by Side Diff: net/quic/crypto/crypto_utils_test.cc

Issue 456403002: Use ARRAYSIZE_UNSAFE when using types defined in a function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert to patchset 1 Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/crypto/crypto_utils.h" 5 #include "net/quic/crypto/crypto_utils.h"
6 6
7 #include "net/quic/test_tools/quic_test_utils.h" 7 #include "net/quic/test_tools/quic_test_utils.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 }, 86 },
87 // Try weird lengths 87 // Try weird lengths
88 { "d0ec8a34f6cc9a8c96", 88 { "d0ec8a34f6cc9a8c96",
89 "49711798cc6251", 89 "49711798cc6251",
90 "933d4a2f30d22f089cfba842791116adc121e0", 90 "933d4a2f30d22f089cfba842791116adc121e0",
91 23, 91 23,
92 "c9a46ed0757bd1812f1f21b4d41e62125fec8364a21db7" 92 "c9a46ed0757bd1812f1f21b4d41e62125fec8364a21db7"
93 }, 93 },
94 }; 94 };
95 95
96 for (size_t i = 0; i < arraysize(test_vector); i++) { 96 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_vector); i++) {
97 // Decode the test vector. 97 // Decode the test vector.
98 string subkey_secret; 98 string subkey_secret;
99 string label; 99 string label;
100 string context; 100 string context;
101 ASSERT_TRUE(DecodeHexString(test_vector[i].subkey_secret, &subkey_secret)); 101 ASSERT_TRUE(DecodeHexString(test_vector[i].subkey_secret, &subkey_secret));
102 ASSERT_TRUE(DecodeHexString(test_vector[i].label, &label)); 102 ASSERT_TRUE(DecodeHexString(test_vector[i].label, &label));
103 ASSERT_TRUE(DecodeHexString(test_vector[i].context, &context)); 103 ASSERT_TRUE(DecodeHexString(test_vector[i].context, &context));
104 size_t result_len = test_vector[i].result_len; 104 size_t result_len = test_vector[i].result_len;
105 bool expect_ok = test_vector[i].expected != NULL; 105 bool expect_ok = test_vector[i].expected != NULL;
106 string expected; 106 string expected;
(...skipping 15 matching lines...) Expand all
122 result.length(), 122 result.length(),
123 expected.data(), 123 expected.data(),
124 expected.length()); 124 expected.length());
125 } 125 }
126 } 126 }
127 } 127 }
128 128
129 } // namespace 129 } // namespace
130 } // namespace test 130 } // namespace test
131 } // namespace net 131 } // namespace net
OLDNEW
« 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