Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Unified Diff: minidump/minidump_system_info_writer_test.cc

Issue 640383002: In tests, use ASSERT_NO_FATAL_FAILURE() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « minidump/minidump_module_writer_test.cc ('k') | util/mac/mac_util_test.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_system_info_writer_test.cc
diff --git a/minidump/minidump_system_info_writer_test.cc b/minidump/minidump_system_info_writer_test.cc
index 48fd9d26b2e45f8089bb9d4beca8f6a77a226016..99d494a79c1e9c8fba5096e19da8a8dfd567c8b4 100644
--- a/minidump/minidump_system_info_writer_test.cc
+++ b/minidump/minidump_system_info_writer_test.cc
@@ -51,10 +51,7 @@ void GetSystemInfoStream(const std::string& file_contents,
const MINIDUMP_HEADER* header =
reinterpret_cast<const MINIDUMP_HEADER*>(&file_contents[0]);
- VerifyMinidumpHeader(header, 1, 0);
- if (testing::Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(VerifyMinidumpHeader(header, 1, 0));
const MINIDUMP_DIRECTORY* directory =
reinterpret_cast<const MINIDUMP_DIRECTORY*>(
@@ -89,10 +86,8 @@ TEST(MinidumpSystemInfoWriter, Empty) {
const MINIDUMP_SYSTEM_INFO* system_info;
const MINIDUMP_STRING* csd_version;
- GetSystemInfoStream(file_writer.string(), 0, &system_info, &csd_version);
- if (Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(
+ GetSystemInfoStream(file_writer.string(), 0, &system_info, &csd_version));
EXPECT_EQ(kMinidumpCPUArchitectureUnknown,
system_info->ProcessorArchitecture);
@@ -162,11 +157,8 @@ TEST(MinidumpSystemInfoWriter, X86_Win) {
const MINIDUMP_SYSTEM_INFO* system_info;
const MINIDUMP_STRING* csd_version;
- GetSystemInfoStream(
- file_writer.string(), strlen(kCSDVersion), &system_info, &csd_version);
- if (Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(GetSystemInfoStream(
+ file_writer.string(), strlen(kCSDVersion), &system_info, &csd_version));
EXPECT_EQ(kCPUArchitecture, system_info->ProcessorArchitecture);
EXPECT_EQ(kCPULevel, system_info->ProcessorLevel);
@@ -225,11 +217,8 @@ TEST(MinidumpSystemInfoWriter, X86_64_Mac) {
const MINIDUMP_SYSTEM_INFO* system_info;
const MINIDUMP_STRING* csd_version;
- GetSystemInfoStream(
- file_writer.string(), strlen(kCSDVersion), &system_info, &csd_version);
- if (Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(GetSystemInfoStream(
+ file_writer.string(), strlen(kCSDVersion), &system_info, &csd_version));
EXPECT_EQ(kCPUArchitecture, system_info->ProcessorArchitecture);
EXPECT_EQ(kCPULevel, system_info->ProcessorLevel);
@@ -270,10 +259,8 @@ TEST(MinidumpSystemInfoWriter, X86_CPUVendorFromRegisters) {
const MINIDUMP_SYSTEM_INFO* system_info;
const MINIDUMP_STRING* csd_version;
- GetSystemInfoStream(file_writer.string(), 0, &system_info, &csd_version);
- if (Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(
+ GetSystemInfoStream(file_writer.string(), 0, &system_info, &csd_version));
EXPECT_EQ(kCPUArchitecture, system_info->ProcessorArchitecture);
EXPECT_EQ(0u, system_info->ProcessorLevel);
« no previous file with comments | « minidump/minidump_module_writer_test.cc ('k') | util/mac/mac_util_test.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698