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

Side by Side Diff: net/tools/quic/stateless_rejector_test.cc

Issue 2331803002: Add default case to test method. (Closed)
Patch Set: Created 4 years, 3 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
« 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/tools/quic/stateless_rejector.h" 5 #include "net/tools/quic/stateless_rejector.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 21 matching lines...) Expand all
32 const char* FlagsModeToString(FlagsMode mode) { 32 const char* FlagsModeToString(FlagsMode mode) {
33 switch (mode) { 33 switch (mode) {
34 case ENABLED: 34 case ENABLED:
35 return "ENABLED"; 35 return "ENABLED";
36 case STATELESS_DISABLED: 36 case STATELESS_DISABLED:
37 return "STATELESS_DISABLED"; 37 return "STATELESS_DISABLED";
38 case CHEAP_DISABLED: 38 case CHEAP_DISABLED:
39 return "CHEAP_DISABLED"; 39 return "CHEAP_DISABLED";
40 case BOTH_DISABLED: 40 case BOTH_DISABLED:
41 return "BOTH_DISABLED"; 41 return "BOTH_DISABLED";
42 default:
43 NOTREACHED();
Ryan Hamilton 2016/09/12 16:42:23 This code is shared with the internal repository t
44 return nullptr;
42 } 45 }
43 } 46 }
44 47
45 // Test various combinations of QUIC version and flag state. 48 // Test various combinations of QUIC version and flag state.
46 struct TestParams { 49 struct TestParams {
47 QuicVersion version; 50 QuicVersion version;
48 FlagsMode flags; 51 FlagsMode flags;
49 }; 52 };
50 53
51 string TestParamToString(const testing::TestParamInfo<TestParams>& params) { 54 string TestParamToString(const testing::TestParamInfo<TestParams>& params) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 if (GetParam().flags != ENABLED || GetParam().version <= QUIC_VERSION_32) { 253 if (GetParam().flags != ENABLED || GetParam().version <= QUIC_VERSION_32) {
251 EXPECT_EQ(StatelessRejector::UNSUPPORTED, rejector_.state()); 254 EXPECT_EQ(StatelessRejector::UNSUPPORTED, rejector_.state());
252 return; 255 return;
253 } 256 }
254 EXPECT_EQ(StatelessRejector::ACCEPTED, rejector_.state()); 257 EXPECT_EQ(StatelessRejector::ACCEPTED, rejector_.state());
255 } 258 }
256 259
257 } // namespace 260 } // namespace
258 } // namespace test 261 } // namespace test
259 } // namespace net 262 } // 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