@@ -37,7 +37,7 @@ class PathMatcherBuilder<const TestMethod*> {
37
37
public:
38
38
MOCK_METHOD5 (Register,
39
39
bool (const std::string&, const std::string&, const std::string&,
40
- const std::set <std::string>&, const TestMethod*));
40
+ const std::unordered_set <std::string>&, const TestMethod*));
41
41
};
42
42
}
43
43
}
@@ -64,12 +64,12 @@ TEST_F(PathMatcherUtilityTest, RegisterGet) {
64
64
http_rule.set_get (" /path" );
65
65
http_rule.set_body (" body" );
66
66
EXPECT_CALL (pmb, Register (Eq (" GET" ), Eq (" /path" ), Eq (" body" ),
67
- Eq (std::set <std::string>()), Eq (&method1_)))
67
+ Eq (std::unordered_set <std::string>()), Eq (&method1_)))
68
68
.WillOnce (Return (true ));
69
69
ASSERT_TRUE (
70
70
PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, &method1_));
71
71
EXPECT_CALL (pmb, Register (Eq (" GET" ), Eq (" /path" ), Eq (" body" ),
72
- Eq (std::set <std::string>{" key" }), Eq (&method2_)))
72
+ Eq (std::unordered_set <std::string>{" key" }), Eq (&method2_)))
73
73
.WillOnce (Return (false ));
74
74
ASSERT_FALSE (PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, {" key" },
75
75
&method2_));
@@ -80,12 +80,12 @@ TEST_F(PathMatcherUtilityTest, RegisterPut) {
80
80
http_rule.set_put (" /path" );
81
81
http_rule.set_body (" body" );
82
82
EXPECT_CALL (pmb, Register (Eq (" PUT" ), Eq (" /path" ), Eq (" body" ),
83
- Eq (std::set <std::string>()), Eq (&method1_)))
83
+ Eq (std::unordered_set <std::string>()), Eq (&method1_)))
84
84
.WillOnce (Return (true ));
85
85
ASSERT_TRUE (
86
86
PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, &method1_));
87
87
EXPECT_CALL (pmb, Register (Eq (" PUT" ), Eq (" /path" ), Eq (" body" ),
88
- Eq (std::set <std::string>{" key" }), Eq (&method2_)))
88
+ Eq (std::unordered_set <std::string>{" key" }), Eq (&method2_)))
89
89
.WillOnce (Return (false ));
90
90
ASSERT_FALSE (PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, {" key" },
91
91
&method2_));
@@ -96,12 +96,12 @@ TEST_F(PathMatcherUtilityTest, RegisterPost) {
96
96
http_rule.set_post (" /path" );
97
97
http_rule.set_body (" body" );
98
98
EXPECT_CALL (pmb, Register (Eq (" POST" ), Eq (" /path" ), Eq (" body" ),
99
- Eq (std::set <std::string>()), Eq (&method1_)))
99
+ Eq (std::unordered_set <std::string>()), Eq (&method1_)))
100
100
.WillOnce (Return (true ));
101
101
ASSERT_TRUE (
102
102
PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, &method1_));
103
103
EXPECT_CALL (pmb, Register (Eq (" POST" ), Eq (" /path" ), Eq (" body" ),
104
- Eq (std::set <std::string>{" key" }), Eq (&method2_)))
104
+ Eq (std::unordered_set <std::string>{" key" }), Eq (&method2_)))
105
105
.WillOnce (Return (false ));
106
106
ASSERT_FALSE (PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, {" key" },
107
107
&method2_));
@@ -112,12 +112,12 @@ TEST_F(PathMatcherUtilityTest, RegisterDelete) {
112
112
http_rule.set_delete_ (" /path" );
113
113
http_rule.set_body (" body" );
114
114
EXPECT_CALL (pmb, Register (Eq (" DELETE" ), Eq (" /path" ), Eq (" body" ),
115
- Eq (std::set <std::string>()), Eq (&method1_)))
115
+ Eq (std::unordered_set <std::string>()), Eq (&method1_)))
116
116
.WillOnce (Return (true ));
117
117
ASSERT_TRUE (
118
118
PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, &method1_));
119
119
EXPECT_CALL (pmb, Register (Eq (" DELETE" ), Eq (" /path" ), Eq (" body" ),
120
- Eq (std::set <std::string>{" key" }), Eq (&method2_)))
120
+ Eq (std::unordered_set <std::string>{" key" }), Eq (&method2_)))
121
121
.WillOnce (Return (false ));
122
122
ASSERT_FALSE (PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, {" key" },
123
123
&method2_));
@@ -128,12 +128,12 @@ TEST_F(PathMatcherUtilityTest, RegisterPatch) {
128
128
http_rule.set_patch (" /path" );
129
129
http_rule.set_body (" body" );
130
130
EXPECT_CALL (pmb, Register (Eq (" PATCH" ), Eq (" /path" ), Eq (" body" ),
131
- Eq (std::set <std::string>()), Eq (&method1_)))
131
+ Eq (std::unordered_set <std::string>()), Eq (&method1_)))
132
132
.WillOnce (Return (true ));
133
133
ASSERT_TRUE (
134
134
PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, &method1_));
135
135
EXPECT_CALL (pmb, Register (Eq (" PATCH" ), Eq (" /path" ), Eq (" body" ),
136
- Eq (std::set <std::string>{" key" }), Eq (&method2_)))
136
+ Eq (std::unordered_set <std::string>{" key" }), Eq (&method2_)))
137
137
.WillOnce (Return (false ));
138
138
ASSERT_FALSE (PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, {" key" },
139
139
&method2_));
@@ -145,12 +145,12 @@ TEST_F(PathMatcherUtilityTest, RegisterCustom) {
145
145
http_rule.mutable_custom ()->set_path (" /custom_path" );
146
146
http_rule.set_body (" body" );
147
147
EXPECT_CALL (pmb, Register (Eq (" OPTIONS" ), Eq (" /custom_path" ), Eq (" body" ),
148
- Eq (std::set <std::string>()), Eq (&method1_)))
148
+ Eq (std::unordered_set <std::string>()), Eq (&method1_)))
149
149
.WillOnce (Return (true ));
150
150
ASSERT_TRUE (
151
151
PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, &method1_));
152
152
EXPECT_CALL (pmb, Register (Eq (" OPTIONS" ), Eq (" /custom_path" ), Eq (" body" ),
153
- Eq (std::set <std::string>{" key" }), Eq (&method2_)))
153
+ Eq (std::unordered_set <std::string>{" key" }), Eq (&method2_)))
154
154
.WillOnce (Return (false ));
155
155
ASSERT_FALSE (PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, {" key" },
156
156
&method2_));
@@ -174,25 +174,25 @@ TEST_F(PathMatcherUtilityTest, RegisterAdditionalBindings) {
174
174
custom_http_rule3.set_put (" /put_path" );
175
175
176
176
EXPECT_CALL (pmb, Register (Eq (" GET" ), Eq (" /path" ), Eq (" body" ),
177
- Eq (std::set <std::string>()), Eq (&method1_)))
177
+ Eq (std::unordered_set <std::string>()), Eq (&method1_)))
178
178
.WillOnce (Return (true ));
179
179
EXPECT_CALL (pmb, Register (Eq (" OPTIONS" ), Eq (" /custom_path" ), Eq (" body1" ),
180
- Eq (std::set <std::string>()), Eq (&method1_)))
180
+ Eq (std::unordered_set <std::string>()), Eq (&method1_)))
181
181
.WillOnce (Return (true ));
182
182
EXPECT_CALL (pmb, Register (Eq (" HEAD" ), Eq (" /path" ), Eq (" " ),
183
- Eq (std::set <std::string>()), Eq (&method1_)))
183
+ Eq (std::unordered_set <std::string>()), Eq (&method1_)))
184
184
.WillOnce (Return (true ));
185
185
EXPECT_CALL (pmb, Register (Eq (" PUT" ), Eq (" /put_path" ), Eq (" " ),
186
- Eq (std::set <std::string>()), Eq (&method1_)))
186
+ Eq (std::unordered_set <std::string>()), Eq (&method1_)))
187
187
.WillOnce (Return (true ));
188
188
ASSERT_TRUE (
189
189
PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, &method1_));
190
190
191
191
EXPECT_CALL (pmb, Register (Eq (" GET" ), Eq (" /path" ), Eq (" body" ),
192
- Eq (std::set <std::string>{" key" }), Eq (&method2_)))
192
+ Eq (std::unordered_set <std::string>{" key" }), Eq (&method2_)))
193
193
.WillOnce (Return (true ));
194
194
EXPECT_CALL (pmb, Register (Eq (" OPTIONS" ), Eq (" /custom_path" ), Eq (" body1" ),
195
- Eq (std::set <std::string>{" key" }), Eq (&method2_)))
195
+ Eq (std::unordered_set <std::string>{" key" }), Eq (&method2_)))
196
196
.WillOnce (Return (false ));
197
197
ASSERT_FALSE (PathMatcherUtility::RegisterByHttpRule (pmb, http_rule, {" key" },
198
198
&method2_));
0 commit comments