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 "minidump/minidump_writable.h" | 15 #include "minidump/minidump_writable.h" |
16 | 16 |
17 #include <string> | 17 #include <string> |
18 #include <vector> | 18 #include <vector> |
19 | 19 |
20 #include "base/basictypes.h" | 20 #include "base/basictypes.h" |
21 #include "gtest/gtest.h" | 21 #include "gtest/gtest.h" |
22 #include "util/file/string_file_writer.h" | 22 #include "util/file/string_file_writer.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 using namespace crashpad; | 26 using namespace crashpad; |
27 using namespace testing; | |
28 | 27 |
29 class BaseTestMinidumpWritable : public crashpad::internal::MinidumpWritable { | 28 class BaseTestMinidumpWritable : public crashpad::internal::MinidumpWritable { |
30 public: | 29 public: |
31 BaseTestMinidumpWritable() | 30 BaseTestMinidumpWritable() |
32 : MinidumpWritable(), | 31 : MinidumpWritable(), |
33 children_(), | 32 children_(), |
34 expected_offset_(-1), | 33 expected_offset_(-1), |
35 alignment_(0), | 34 alignment_(0), |
36 phase_(kPhaseEarly), | 35 phase_(kPhaseEarly), |
37 has_alignment_(false), | 36 has_alignment_(false), |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 EXPECT_STREQ("p", ldd->string); | 825 EXPECT_STREQ("p", ldd->string); |
827 ldd = LDDAtIndex(writer.string(), 48); | 826 ldd = LDDAtIndex(writer.string(), 48); |
828 EXPECT_EQ(10u, ldd->location_descriptor.DataSize); | 827 EXPECT_EQ(10u, ldd->location_descriptor.DataSize); |
829 EXPECT_EQ(12u, ldd->location_descriptor.Rva); | 828 EXPECT_EQ(12u, ldd->location_descriptor.Rva); |
830 EXPECT_STREQ("o", ldd->string); | 829 EXPECT_STREQ("o", ldd->string); |
831 parent.Verify(); | 830 parent.Verify(); |
832 } | 831 } |
833 } | 832 } |
834 | 833 |
835 } // namespace | 834 } // namespace |
OLD | NEW |