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

Unified Diff: minidump/minidump_memory_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_file_writer_test.cc ('k') | minidump/minidump_misc_info_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_memory_writer_test.cc
diff --git a/minidump/minidump_memory_writer_test.cc b/minidump/minidump_memory_writer_test.cc
index be528797e55fe2bf5d342c012a839c0464308e2b..5d75a7c1e2520775612d2393d54119aade070b48 100644
--- a/minidump/minidump_memory_writer_test.cc
+++ b/minidump/minidump_memory_writer_test.cc
@@ -50,10 +50,7 @@ void GetMemoryListStream(const std::string& file_contents,
const MINIDUMP_HEADER* header =
reinterpret_cast<const MINIDUMP_HEADER*>(&file_contents[0]);
- VerifyMinidumpHeader(header, expected_streams, 0);
- if (testing::Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(VerifyMinidumpHeader(header, expected_streams, 0));
const MINIDUMP_DIRECTORY* directory =
reinterpret_cast<const MINIDUMP_DIRECTORY*>(
@@ -93,10 +90,8 @@ TEST(MinidumpMemoryWriter, EmptyMemoryList) {
file_writer.string().size());
const MINIDUMP_MEMORY_LIST* memory_list;
- GetMemoryListStream(file_writer.string(), &memory_list, 1);
- if (Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(
+ GetMemoryListStream(file_writer.string(), &memory_list, 1));
EXPECT_EQ(0u, memory_list->NumberOfMemoryRanges);
}
@@ -118,10 +113,8 @@ TEST(MinidumpMemoryWriter, OneMemoryRegion) {
ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
const MINIDUMP_MEMORY_LIST* memory_list;
- GetMemoryListStream(file_writer.string(), &memory_list, 1);
- if (Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(
+ GetMemoryListStream(file_writer.string(), &memory_list, 1));
MINIDUMP_MEMORY_DESCRIPTOR expected;
expected.StartOfMemoryRange = kBaseAddress;
@@ -159,10 +152,8 @@ TEST(MinidumpMemoryWriter, TwoMemoryRegions) {
ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
const MINIDUMP_MEMORY_LIST* memory_list;
- GetMemoryListStream(file_writer.string(), &memory_list, 1);
- if (Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(
+ GetMemoryListStream(file_writer.string(), &memory_list, 1));
EXPECT_EQ(2u, memory_list->NumberOfMemoryRanges);
@@ -266,10 +257,8 @@ TEST(MinidumpMemoryWriter, ExtraMemory) {
ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
const MINIDUMP_MEMORY_LIST* memory_list;
- GetMemoryListStream(file_writer.string(), &memory_list, 2);
- if (Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(
+ GetMemoryListStream(file_writer.string(), &memory_list, 2));
EXPECT_EQ(2u, memory_list->NumberOfMemoryRanges);
« no previous file with comments | « minidump/minidump_file_writer_test.cc ('k') | minidump/minidump_misc_info_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698