MCPcopy Create free account
hub / github.com/chromium/crashpad / Compare

Method Compare

util/process/process_memory_test.cc:320–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318 }
319
320 void Compare(ProcessMemory& memory, VMAddress address, const char* str) {
321 std::string result;
322 if (limit_size_) {
323 ASSERT_TRUE(
324 memory.ReadCStringSizeLimited(address, strlen(str) + 1, &result));
325 EXPECT_EQ(result, str);
326 ASSERT_TRUE(
327 memory.ReadCStringSizeLimited(address, strlen(str) + 2, &result));
328 EXPECT_EQ(result, str);
329 EXPECT_FALSE(
330 memory.ReadCStringSizeLimited(address, strlen(str), &result));
331 } else {
332 ASSERT_TRUE(memory.ReadCString(address, &result));
333 EXPECT_EQ(result, str);
334 }
335 }
336
337 void DoTest(ProcessType process,
338 VMAddress const_empty_address,

Callers

nothing calls this directly

Calls 2

ReadCStringMethod · 0.45

Tested by

no test coverage detected