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

Unified Diff: base/metrics/persistent_memory_allocator_unittest.cc

Issue 1855373002: Added comments about expected error messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_memory_allocator_unittest.cc
diff --git a/base/metrics/persistent_memory_allocator_unittest.cc b/base/metrics/persistent_memory_allocator_unittest.cc
index b34cf14de315d1bc464565df624cb824736f5313..ca02f2e101a622c3f1ee61d20d0d0a64ddd06b6d 100644
--- a/base/metrics/persistent_memory_allocator_unittest.cc
+++ b/base/metrics/persistent_memory_allocator_unittest.cc
@@ -565,7 +565,8 @@ TEST(FilePersistentMemoryAllocatorTest, AcceptableTest) {
mmfile->Initialize(file_path);
EXPECT_EQ(filesize, mmfile->length());
if (FilePersistentMemoryAllocator::IsFileAcceptable(*mmfile)) {
- // Make sure construction doesn't crash.
+ // Make sure construction doesn't crash. It will, however, cause
+ // error messages warning about about a corrupted memory segment.
FilePersistentMemoryAllocator allocator(std::move(mmfile), 0, "");
// Also make sure that iteration doesn't crash.
PersistentMemoryAllocator::Iterator iter;
@@ -605,7 +606,8 @@ TEST(FilePersistentMemoryAllocatorTest, AcceptableTest) {
mmfile->Initialize(file_path);
EXPECT_EQ(filesize, mmfile->length());
if (FilePersistentMemoryAllocator::IsFileAcceptable(*mmfile)) {
- // Just need to make sure it doesn't crash.
+ // Make sure construction doesn't crash. It will, however, cause
+ // error messages warning about about a corrupted memory segment.
FilePersistentMemoryAllocator allocator(std::move(mmfile), 0, "");
EXPECT_TRUE(allocator.IsCorrupt()); // Garbage data so it should be.
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698