OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
13 // limitations under the License. | 13 // limitations under the License. |
14 | 14 |
15 #include "util/net/http_body.h" | 15 #include "util/net/http_body.h" |
16 | 16 |
17 #include "gtest/gtest.h" | 17 #include "gtest/gtest.h" |
| 18 #include "test/paths.h" |
18 #include "util/net/http_body_test_util.h" | 19 #include "util/net/http_body_test_util.h" |
19 #include "util/test/paths.h" | |
20 | 20 |
21 namespace crashpad { | 21 namespace crashpad { |
22 namespace test { | 22 namespace test { |
23 namespace { | 23 namespace { |
24 | 24 |
25 void ExpectBufferSet(const uint8_t* actual, | 25 void ExpectBufferSet(const uint8_t* actual, |
26 uint8_t expected_byte, | 26 uint8_t expected_byte, |
27 size_t num_expected_bytes) { | 27 size_t num_expected_bytes) { |
28 for (size_t i = 0; i < num_expected_bytes; ++i) { | 28 for (size_t i = 0; i < num_expected_bytes; ++i) { |
29 EXPECT_EQ(expected_byte, actual[i]) << i; | 29 EXPECT_EQ(expected_byte, actual[i]) << i; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 EXPECT_EQ(expected_string, actual_string); | 208 EXPECT_EQ(expected_string, actual_string); |
209 } | 209 } |
210 | 210 |
211 INSTANTIATE_TEST_CASE_P(VariableBufferSize, | 211 INSTANTIATE_TEST_CASE_P(VariableBufferSize, |
212 CompositeHTTPBodyStreamBufferSize, | 212 CompositeHTTPBodyStreamBufferSize, |
213 testing::Values(1, 2, 9, 16, 31, 128, 1024)); | 213 testing::Values(1, 2, 9, 16, 31, 128, 1024)); |
214 | 214 |
215 } // namespace | 215 } // namespace |
216 } // namespace test | 216 } // namespace test |
217 } // namespace crashpad | 217 } // namespace crashpad |
OLD | NEW |