chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer_test.cc

// Copyright 2014 The Crashpad Authors
//
// 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 "minidump/minidump_misc_info_writer.h"

#include <string.h>

#include <iterator>
#include <string>
#include <utility>

#include "base/format_macros.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "gtest/gtest.h"
#include "minidump/minidump_file_writer.h"
#include "minidump/test/minidump_file_writer_test_util.h"
#include "minidump/test/minidump_writable_test_util.h"
#include "snapshot/test/test_process_snapshot.h"
#include "snapshot/test/test_system_snapshot.h"
#include "util/file/string_file.h"
#include "util/stdlib/strlcpy.h"

namespace crashpad {
namespace test {
namespace {

template <typename T>
void GetMiscInfoStream(const std::string& file_contents, const T** misc_info) {}

void ExpectNULPaddedString16Equal(const char16_t* expected,
                                  const char16_t* observed,
                                  size_t size) {}

void ExpectSystemTimeEqual(const SYSTEMTIME* expected,
                           const SYSTEMTIME* observed) {}

template <typename T>
void ExpectMiscInfoEqual(const T* expected, const T* observed);

template <>
void ExpectMiscInfoEqual<MINIDUMP_MISC_INFO>(
    const MINIDUMP_MISC_INFO* expected,
    const MINIDUMP_MISC_INFO* observed) {}

template <>
void ExpectMiscInfoEqual<MINIDUMP_MISC_INFO_2>(
    const MINIDUMP_MISC_INFO_2* expected,
    const MINIDUMP_MISC_INFO_2* observed) {}

template <>
void ExpectMiscInfoEqual<MINIDUMP_MISC_INFO_3>(
    const MINIDUMP_MISC_INFO_3* expected,
    const MINIDUMP_MISC_INFO_3* observed) {}

template <>
void ExpectMiscInfoEqual<MINIDUMP_MISC_INFO_4>(
    const MINIDUMP_MISC_INFO_4* expected,
    const MINIDUMP_MISC_INFO_4* observed) {}

template <>
void ExpectMiscInfoEqual<MINIDUMP_MISC_INFO_5>(
    const MINIDUMP_MISC_INFO_5* expected,
    const MINIDUMP_MISC_INFO_5* observed) {}

// Bypass restrictions on conversion of compile-time constants (added for
// https://crbug.com/1189439).
const char* Crbug1189439Cast(const char str[]) {}

TEST(MinidumpMiscInfoWriter, Empty) {}

TEST(MinidumpMiscInfoWriter, ProcessId) {}

TEST(MinidumpMiscInfoWriter, ProcessTimes) {}

TEST(MinidumpMiscInfoWriter, ProcessorPowerInfo) {}

TEST(MinidumpMiscInfoWriter, ProcessIntegrityLevel) {}

TEST(MinidumpMiscInfoWriter, ProcessExecuteFlags) {}

TEST(MinidumpMiscInfoWriter, ProtectedProcess) {}

TEST(MinidumpMiscInfoWriter, TimeZone) {}

TEST(MinidumpMiscInfoWriter, TimeZoneStringsOverflow) {}

TEST(MinidumpMiscInfoWriter, BuildStrings) {}

TEST(MinidumpMiscInfoWriter, BuildStringsOverflow) {}

TEST(MinidumpMiscInfoWriter, XStateData) {}

TEST(MinidumpMiscInfoWriter, ProcessCookie) {}

TEST(MinidumpMiscInfoWriter, Everything) {}

TEST(MinidumpMiscInfoWriter, InitializeFromSnapshot) {}

}  // namespace
}  // namespace test
}  // namespace crashpad