#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) { … }
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) { … }
}
}
}