| Index: snapshot/test/test_module_snapshot.cc
|
| diff --git a/snapshot/test/test_module_snapshot.cc b/snapshot/test/test_module_snapshot.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..497eb77a864ac3756a0ffb9e509d8cdc077db270
|
| --- /dev/null
|
| +++ b/snapshot/test/test_module_snapshot.cc
|
| @@ -0,0 +1,90 @@
|
| +// Copyright 2014 The Crashpad Authors. All rights reserved.
|
| +//
|
| +// Licensed under the Apache License, Version 2.0 (the "License");
|
| +// you may not use this file except in compliance with the License.
|
| +// You may obtain a copy of the License at
|
| +//
|
| +// http://www.apache.org/licenses/LICENSE-2.0
|
| +//
|
| +// Unless required by applicable law or agreed to in writing, software
|
| +// distributed under the License is distributed on an "AS IS" BASIS,
|
| +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| +// See the License for the specific language governing permissions and
|
| +// limitations under the License.
|
| +
|
| +#include "snapshot/test/test_module_snapshot.h"
|
| +
|
| +namespace crashpad {
|
| +namespace test {
|
| +
|
| +TestModuleSnapshot::TestModuleSnapshot()
|
| + : name_(),
|
| + address_(0),
|
| + size_(0),
|
| + timestamp_(0),
|
| + file_version_(),
|
| + source_version_(),
|
| + module_type_(kModuleTypeUnknown),
|
| + uuid_(),
|
| + annotations_vector_(),
|
| + annotations_simple_map_() {
|
| +}
|
| +
|
| +TestModuleSnapshot::~TestModuleSnapshot() {
|
| +}
|
| +
|
| +std::string TestModuleSnapshot::Name() const {
|
| + return name_;
|
| +}
|
| +
|
| +uint64_t TestModuleSnapshot::Address() const {
|
| + return address_;
|
| +}
|
| +
|
| +uint64_t TestModuleSnapshot::Size() const {
|
| + return size_;
|
| +}
|
| +
|
| +time_t TestModuleSnapshot::Timestamp() const {
|
| + return timestamp_;
|
| +}
|
| +
|
| +void TestModuleSnapshot::FileVersion(uint16_t* version_0,
|
| + uint16_t* version_1,
|
| + uint16_t* version_2,
|
| + uint16_t* version_3) const {
|
| + *version_0 = file_version_[0];
|
| + *version_1 = file_version_[1];
|
| + *version_2 = file_version_[2];
|
| + *version_3 = file_version_[3];
|
| +}
|
| +
|
| +void TestModuleSnapshot::SourceVersion(uint16_t* version_0,
|
| + uint16_t* version_1,
|
| + uint16_t* version_2,
|
| + uint16_t* version_3) const {
|
| + *version_0 = source_version_[0];
|
| + *version_1 = source_version_[1];
|
| + *version_2 = source_version_[2];
|
| + *version_3 = source_version_[3];
|
| +}
|
| +
|
| +ModuleSnapshot::ModuleType TestModuleSnapshot::GetModuleType() const {
|
| + return module_type_;
|
| +}
|
| +
|
| +void TestModuleSnapshot::UUID(crashpad::UUID* uuid) const {
|
| + *uuid = uuid_;
|
| +}
|
| +
|
| +std::vector<std::string> TestModuleSnapshot::AnnotationsVector() const {
|
| + return annotations_vector_;
|
| +}
|
| +
|
| +std::map<std::string, std::string> TestModuleSnapshot::AnnotationsSimpleMap()
|
| + const {
|
| + return annotations_simple_map_;
|
| +}
|
| +
|
| +} // namespace test
|
| +} // namespace crashpad
|
|
|